Title: [231161] trunk/Source/WebCore
Revision
231161
Author
[email protected]
Date
2018-04-30 12:13:33 -0700 (Mon, 30 Apr 2018)

Log Message

Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages()
https://bugs.webkit.org/show_bug.cgi?id=185134

Reviewed by Geoffrey Garen.

Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages(). This code runs on iOS WebKitLegacy
and it is therefore unsafe to use RunLoop::main() here. We want to use callOnMainThread() instead to run code on
the WebThread.

* dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (231160 => 231161)


--- trunk/Source/WebCore/ChangeLog	2018-04-30 18:02:08 UTC (rev 231160)
+++ trunk/Source/WebCore/ChangeLog	2018-04-30 19:13:33 UTC (rev 231161)
@@ -1,3 +1,17 @@
+2018-04-30  Chris Dumez  <[email protected]>
+
+        Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages()
+        https://bugs.webkit.org/show_bug.cgi?id=185134
+
+        Reviewed by Geoffrey Garen.
+
+        Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages(). This code runs on iOS WebKitLegacy
+        and it is therefore unsafe to use RunLoop::main() here. We want to use callOnMainThread() instead to run code on
+        the WebThread.
+
+        * dom/MessagePort.cpp:
+        (WebCore::MessagePort::dispatchMessages):
+
 2018-04-30  Simon Fraser  <[email protected]>
 
         Make color-filter affect caret-color

Modified: trunk/Source/WebCore/dom/MessagePort.cpp (231160 => 231161)


--- trunk/Source/WebCore/dom/MessagePort.cpp	2018-04-30 18:02:08 UTC (rev 231160)
+++ trunk/Source/WebCore/dom/MessagePort.cpp	2018-04-30 19:13:33 UTC (rev 231161)
@@ -284,7 +284,7 @@
         }
         workerThread->runLoop().postTaskForMode([innerHandler = WTFMove(innerHandler), messages = WTFMove(messages), completionCallback = WTFMove(completionCallback)](auto&) mutable {
             innerHandler(WTFMove(messages));
-            RunLoop::main().dispatch([completionCallback = WTFMove(completionCallback)] {
+            callOnMainThread([completionCallback = WTFMove(completionCallback)] {
                 completionCallback();
             });
         }, WorkerRunLoop::defaultMode());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to