Title: [95012] trunk/Source/WebKit/chromium
Revision
95012
Author
le...@chromium.org
Date
2011-09-12 21:15:59 -0700 (Mon, 12 Sep 2011)

Log Message

[chromium] Remove AllowCrossThreadAccess for WorkerFileWriterCallbacksBridge.
https://bugs.webkit.org/show_bug.cgi?id=67943

Reviewed by Adam Barth.

* src/WorkerFileWriterCallbacksBridge.cpp: Removed AllowCrossThreadAccess
allowing the automatic ref counting to work. This was previous needed when
the ref counting wasn't working but that was fixed in r94986. Note that the
design was to have ref counting since the methods take PassRefPtr and the
class is ThreadSafeRefCounted. (Ideally we have noticed this flaw when
adding in AllowCrossThreadAccess.)
(WebKit::WorkerFileWriterCallbacksBridge::postWriteToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::postTruncateToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::postAbortToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::didWrite):
(WebKit::WorkerFileWriterCallbacksBridge::didFail):
(WebKit::WorkerFileWriterCallbacksBridge::didTruncate):
(WebKit::WorkerFileWriterCallbacksBridge::postInitToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (95011 => 95012)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-09-13 04:01:59 UTC (rev 95011)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-09-13 04:15:59 UTC (rev 95012)
@@ -1,3 +1,26 @@
+2011-09-12  David Levin  <le...@chromium.org>
+
+        [chromium] Remove AllowCrossThreadAccess for WorkerFileWriterCallbacksBridge.
+        https://bugs.webkit.org/show_bug.cgi?id=67943
+
+        Reviewed by Adam Barth.
+
+        * src/WorkerFileWriterCallbacksBridge.cpp: Removed AllowCrossThreadAccess
+        allowing the automatic ref counting to work. This was previous needed when
+        the ref counting wasn't working but that was fixed in r94986. Note that the
+        design was to have ref counting since the methods take PassRefPtr and the
+        class is ThreadSafeRefCounted. (Ideally we have noticed this flaw when
+        adding in AllowCrossThreadAccess.)
+        (WebKit::WorkerFileWriterCallbacksBridge::postWriteToMainThread):
+        (WebKit::WorkerFileWriterCallbacksBridge::postTruncateToMainThread):
+        (WebKit::WorkerFileWriterCallbacksBridge::postAbortToMainThread):
+        (WebKit::WorkerFileWriterCallbacksBridge::didWrite):
+        (WebKit::WorkerFileWriterCallbacksBridge::didFail):
+        (WebKit::WorkerFileWriterCallbacksBridge::didTruncate):
+        (WebKit::WorkerFileWriterCallbacksBridge::postInitToMainThread):
+        (WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToMainThread):
+        (WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread):
+
 2011-09-08  Nat Duca  <nd...@chromium.org>
 
         [chromium] Add GraphicsContext3DPrivate:createGraphicsContextForAnotherThread

Modified: trunk/Source/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp (95011 => 95012)


--- trunk/Source/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp	2011-09-13 04:01:59 UTC (rev 95011)
+++ trunk/Source/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp	2011-09-13 04:15:59 UTC (rev 95012)
@@ -62,7 +62,7 @@
     ASSERT(!m_operationInProgress);
     m_operationInProgress = true;
     dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread, 
-                                                AllowCrossThreadAccess(this), position, data));
+                                                this, position, data));
 }
 
 void WorkerFileWriterCallbacksBridge::postTruncateToMainThread(long long length)
@@ -70,13 +70,13 @@
     ASSERT(!m_operationInProgress);
     m_operationInProgress = true;
     dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread, 
-                                                AllowCrossThreadAccess(this), length));
+                                                this, length));
 }
 
 void WorkerFileWriterCallbacksBridge::postAbortToMainThread()
 {
     ASSERT(m_operationInProgress);
-    dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, AllowCrossThreadAccess(this)));
+    dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, this));
 }
 
 void WorkerFileWriterCallbacksBridge::postShutdownToMainThread(PassRefPtr<WorkerFileWriterCallbacksBridge> bridge)
@@ -115,17 +115,17 @@
 
 void WorkerFileWriterCallbacksBridge::didWrite(long long bytes, bool complete)
 {
-    dispatchTaskToWorkerThread(createCallbackTask(&didWriteOnWorkerThread, AllowCrossThreadAccess(this), bytes, complete));
+    dispatchTaskToWorkerThread(createCallbackTask(&didWriteOnWorkerThread, this, bytes, complete));
 }
 
 void WorkerFileWriterCallbacksBridge::didFail(WebFileError error)
 {
-    dispatchTaskToWorkerThread(createCallbackTask(&didFailOnWorkerThread, AllowCrossThreadAccess(this), error));
+    dispatchTaskToWorkerThread(createCallbackTask(&didFailOnWorkerThread, this, error));
 }
 
 void WorkerFileWriterCallbacksBridge::didTruncate()
 {
-    dispatchTaskToWorkerThread(createCallbackTask(&didTruncateOnWorkerThread, AllowCrossThreadAccess(this)));
+    dispatchTaskToWorkerThread(createCallbackTask(&didTruncateOnWorkerThread, this));
 }
 
 static const char fileWriterOperationsMode[] = "fileWriterOperationsMode";
@@ -147,7 +147,7 @@
 void WorkerFileWriterCallbacksBridge::postInitToMainThread(const KURL& path)
 {
     dispatchTaskToMainThread(
-        createCallbackTask(&initOnMainThread, AllowCrossThreadAccess(this), path));
+        createCallbackTask(&initOnMainThread, this, path));
 }
 
 WorkerFileWriterCallbacksBridge::~WorkerFileWriterCallbacksBridge()
@@ -200,14 +200,14 @@
 {
     ASSERT(m_workerContext->isContextThread());
     WebWorkerBase::dispatchTaskToMainThread(
-        createCallbackTask(&runTaskOnMainThread, AllowCrossThreadAccess(this), task));
+        createCallbackTask(&runTaskOnMainThread, this, task));
 }
 
 void WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread(PassOwnPtr<ScriptExecutionContext::Task> task)
 {
     ASSERT(isMainThread());
     m_proxy->postTaskForModeToWorkerContext(
-        createCallbackTask(&runTaskOnWorkerThread, AllowCrossThreadAccess(this), task), m_mode);
+        createCallbackTask(&runTaskOnWorkerThread, this, task), m_mode);
 }
 
 bool WorkerFileWriterCallbacksBridge::waitForOperationToComplete()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to