Title: [272680] trunk/Source/WebKit
Revision
272680
Author
[email protected]
Date
2021-02-10 13:04:13 -0800 (Wed, 10 Feb 2021)

Log Message

WebGL IPC messages are delivered out of order
https://bugs.webkit.org/show_bug.cgi?id=221488

Patch by Kimmo Kinnunen <[email protected]> on 2021-02-10
Reviewed by Chris Dumez.

Sync messages are delivered before earlier async messages, if some other
WebKit part waits on sync replies.

No new tests, makes the existing WebGL --use-gpu-process tests a bit less
flakey.

* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
Mark all async messages with IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply.
There are no messages in the receiver message list that would make sense
to be delivered out of order.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (272679 => 272680)


--- trunk/Source/WebKit/ChangeLog	2021-02-10 20:55:02 UTC (rev 272679)
+++ trunk/Source/WebKit/ChangeLog	2021-02-10 21:04:13 UTC (rev 272680)
@@ -1,3 +1,22 @@
+2021-02-10  Kimmo Kinnunen  <[email protected]>
+
+        WebGL IPC messages are delivered out of order
+        https://bugs.webkit.org/show_bug.cgi?id=221488
+
+        Reviewed by Chris Dumez.
+
+        Sync messages are delivered before earlier async messages, if some other
+        WebKit part waits on sync replies.
+
+        No new tests, makes the existing WebGL --use-gpu-process tests a bit less
+        flakey.
+
+        * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
+        * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
+        Mark all async messages with IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply.
+        There are no messages in the receiver message list that would make sense
+        to be delivered out of order.
+
 2021-02-10  Wenson Hsieh  <[email protected]>
 
         Use HAVE(PEPPER_UI_CORE) instead of PLATFORM(WATCHOS) to guard code that uses PepperUICore

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp (272679 => 272680)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp	2021-02-10 20:55:02 UTC (rev 272679)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp	2021-02-10 21:04:13 UTC (rev 272680)
@@ -54,7 +54,7 @@
 {
     gpuProcessConnection.addClient(*this);
     gpuProcessConnection.messageReceiverMap().addMessageReceiver(Messages::RemoteGraphicsContextGLProxy::messageReceiverName(), m_graphicsContextGLIdentifier.toUInt64(), *this);
-    connection().send(Messages::GPUConnectionToWebProcess::CreateGraphicsContextGL(attrs, m_graphicsContextGLIdentifier), 0);
+    connection().send(Messages::GPUConnectionToWebProcess::CreateGraphicsContextGL(attrs, m_graphicsContextGLIdentifier), 0, IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply);
 }
 
 RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy()
@@ -235,7 +235,7 @@
     if (auto gpuProcessConnection = std::exchange(m_gpuProcessConnection, nullptr)) {
         gpuProcessConnection->removeClient(*this);
         gpuProcessConnection->messageReceiverMap().removeMessageReceiver(Messages::RemoteGraphicsContextGLProxy::messageReceiverName(), m_graphicsContextGLIdentifier.toUInt64());
-        gpuProcessConnection->connection().send(Messages::GPUConnectionToWebProcess::ReleaseGraphicsContextGL(m_graphicsContextGLIdentifier), 0);
+        gpuProcessConnection->connection().send(Messages::GPUConnectionToWebProcess::ReleaseGraphicsContextGL(m_graphicsContextGLIdentifier), 0, IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply);
     }
     ASSERT(isContextLost());
 }

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h (272679 => 272680)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h	2021-02-10 20:55:02 UTC (rev 272679)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h	2021-02-10 21:04:13 UTC (rev 272680)
@@ -334,7 +334,7 @@
     template<typename T>
     WARN_UNUSED_RETURN bool send(T&& message)
     {
-        connection().send(WTFMove(message), m_graphicsContextGLIdentifier.toUInt64());
+        connection().send(WTFMove(message), m_graphicsContextGLIdentifier.toUInt64(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply);
         return true;
     }
     template<typename T>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to