Title: [148425] trunk/Source/WebCore
- Revision
- 148425
- Author
- commit-qu...@webkit.org
- Date
- 2013-04-15 03:11:36 -0700 (Mon, 15 Apr 2013)
Log Message
[BlackBerry] Filesystem callback notifyCreateSnapshotFileAndReadMetadata can be called on the wring thread
https://bugs.webkit.org/show_bug.cgi?id=114610
Patch by Carlos Garcia Campos <cgar...@igalia.com> on 2013-04-15
Reviewed by Xan Lopez.
Override notifyCreateSnapshotFileAndReadMetadata to make sure the
callback is called on the right thread.
Fixes a crash in several fast/filesystem test in debug builds.
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata):
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadataOnWorkerThread):
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148424 => 148425)
--- trunk/Source/WebCore/ChangeLog 2013-04-15 09:28:59 UTC (rev 148424)
+++ trunk/Source/WebCore/ChangeLog 2013-04-15 10:11:36 UTC (rev 148425)
@@ -1,3 +1,20 @@
+2013-04-15 Carlos Garcia Campos <cgar...@igalia.com>
+
+ [BlackBerry] Filesystem callback notifyCreateSnapshotFileAndReadMetadata can be called on the wring thread
+ https://bugs.webkit.org/show_bug.cgi?id=114610
+
+ Reviewed by Xan Lopez.
+
+ Override notifyCreateSnapshotFileAndReadMetadata to make sure the
+ callback is called on the right thread.
+
+ Fixes a crash in several fast/filesystem test in debug builds.
+
+ * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
+ (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata):
+ (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadataOnWorkerThread):
+ * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
+
2013-04-15 Arvid Nilsson <anils...@rim.com>
[BlackBerry][CSS Filters] Non-image content disappears when filter applied
Modified: trunk/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp (148424 => 148425)
--- trunk/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp 2013-04-15 09:28:59 UTC (rev 148424)
+++ trunk/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp 2013-04-15 10:11:36 UTC (rev 148425)
@@ -130,6 +130,19 @@
m_mutex.unlock();
}
+void WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata(const BlackBerry::Platform::WebFileInfo& fileInfo)
+{
+ m_mutex.lock();
+ if (!m_context) {
+ m_mutex.unlock();
+ PlatformAsyncFileSystemCallbacks::deleteMe();
+ return;
+ }
+
+ postTaskToWorkerThread(createCallbackTask(¬ifyCreateSnapshotFileAndReadMetadataOnWorkerThread, this, fileInfo));
+ m_mutex.unlock();
+}
+
void WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectory(const std::vector<BlackBerry::Platform::WebFileSystemEntry>& entries, bool hasMore)
{
m_mutex.lock();
@@ -200,6 +213,11 @@
callbacks->PlatformAsyncFileSystemCallbacks::notifyReadMetadata(fileInfo);
}
+void WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadataOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks* callbacks, const BlackBerry::Platform::WebFileInfo& fileInfo)
+{
+ callbacks->PlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata(fileInfo);
+}
+
void WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectoryEntryOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks* callbacks, const std::vector<BlackBerry::Platform::WebFileSystemEntry>& entries, bool hasMore)
{
callbacks->PlatformAsyncFileSystemCallbacks::notifyReadDirectory(entries, hasMore);
Modified: trunk/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h (148424 => 148425)
--- trunk/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h 2013-04-15 09:28:59 UTC (rev 148424)
+++ trunk/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h 2013-04-15 10:11:36 UTC (rev 148425)
@@ -84,6 +84,7 @@
virtual void notifySucceed();
virtual void notifyFail(BlackBerry::Platform::WebFileError);
virtual void notifyReadMetadata(const BlackBerry::Platform::WebFileInfo&);
+ virtual void notifyCreateSnapshotFileAndReadMetadata(const BlackBerry::Platform::WebFileInfo&);
virtual void notifyReadDirectory(const std::vector<BlackBerry::Platform::WebFileSystemEntry>& entries, bool hasMore);
virtual void notifyCreateFileWriter(BlackBerry::Platform::WebFileWriter* platformWriter, long long length);
virtual PassOwnPtr<AsyncFileSystem> createAsyncFileSystem(PassOwnPtr<BlackBerry::Platform::WebFileSystem> platformFileSystem);
@@ -97,6 +98,7 @@
static void notifySucceedOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks*);
static void notifyFailOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks*, BlackBerry::Platform::WebFileError);
static void notifyReadMetadataOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks*, const BlackBerry::Platform::WebFileInfo&);
+ static void notifyCreateSnapshotFileAndReadMetadataOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks*, const BlackBerry::Platform::WebFileInfo&);
static void notifyReadDirectoryEntryOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks*, const std::vector<BlackBerry::Platform::WebFileSystemEntry>& entries, bool hasMore);
static void notifyCreateFileWriterOnWorkerThread(ScriptExecutionContext*, WorkerPlatformAsyncFileSystemCallbacks*, BlackBerry::Platform::WebFileWriter* platformWriter, long long length);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes