Title: [272546] trunk/Source/WebKit
Revision
272546
Author
[email protected]
Date
2021-02-08 13:40:55 -0800 (Mon, 08 Feb 2021)

Log Message

Prevent WebProcess to re-enter on sync IPC to the GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=221566
<rdar://problem/74108466>

Reviewed by Ryosuke Niwa.

Prevent WebProcess to re-enter on sync IPC to the GPUProcess, similarly to what we already
do for sync IPC to other processes (Network, UI).

* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (272545 => 272546)


--- trunk/Source/WebKit/ChangeLog	2021-02-08 21:26:36 UTC (rev 272545)
+++ trunk/Source/WebKit/ChangeLog	2021-02-08 21:40:55 UTC (rev 272546)
@@ -1,3 +1,17 @@
+2021-02-08  Chris Dumez  <[email protected]>
+
+        Prevent WebProcess to re-enter on sync IPC to the GPUProcess
+        https://bugs.webkit.org/show_bug.cgi?id=221566
+        <rdar://problem/74108466>
+
+        Reviewed by Ryosuke Niwa.
+
+        Prevent WebProcess to re-enter on sync IPC to the GPUProcess, similarly to what we already
+        do for sync IPC to other processes (Network, UI).
+
+        * GPUProcess/GPUConnectionToWebProcess.cpp:
+        (WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
+
 2021-02-08  Youenn Fablet  <[email protected]>
 
         [MacOS] Enable Audio Capture in GPUProcess by default

Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (272545 => 272546)


--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2021-02-08 21:26:36 UTC (rev 272545)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2021-02-08 21:40:55 UTC (rev 272546)
@@ -175,6 +175,11 @@
 #endif
 {
     RELEASE_ASSERT(RunLoop::isMain());
+
+    // Use this flag to force synchronous messages to be treated as asynchronous messages in the WebProcess.
+    // Otherwise, the WebProcess would process incoming synchronous IPC while waiting for a synchronous IPC
+    // reply from the GPU process, which would be unsafe.
+    m_connection->setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
     m_connection->open();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to