WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-221488-20210205203733.patch (text/plain), 4.65 KB, created by
Kimmo Kinnunen
on 2021-02-05 10:37:34 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kimmo Kinnunen
Created:
2021-02-05 10:37:34 PST
Size:
4.65 KB
patch
obsolete
>Subversion Revision: 272404 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 250b7b12ed9ed5815a1abcdf421bb54629ee6b38..1496ad73ae21e615110bbef8637981af0c641f3e 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,25 @@ >+2021-02-05 Kimmo Kinnunen <kkinnunen@apple.com> >+ >+ WebGL IPC messages are delivered out of order >+ https://bugs.webkit.org/show_bug.cgi?id=221488 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ >+ * Platform/IPC/Connection.cpp: >+ (IPC::Connection::sendSyncMessage): >+ * Platform/IPC/Connection.h: >+ Add new SendSyncOption: DispatchInReceiveOrder. This means that synchronous messages >+ be dispatched in normal order, e.g. their receive order. >+ >+ * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h: >+ Use the flag. >+ > 2021-02-04 Kimmo Kinnunen <kkinnunen@apple.com> > > RemoteGraphicsContextGLProxy should support losing the context and should lose the context on timeouts >diff --git a/Source/WebKit/Platform/IPC/Connection.cpp b/Source/WebKit/Platform/IPC/Connection.cpp >index cdaf13a5d6b2ad0a51767bdc051190d1efc46c2e..91ae6fa7747ca4c46d3439983a939201b4206cb6 100644 >--- a/Source/WebKit/Platform/IPC/Connection.cpp >+++ b/Source/WebKit/Platform/IPC/Connection.cpp >@@ -610,9 +610,15 @@ std::unique_ptr<Decoder> Connection::sendSyncMessage(uint64_t syncRequestID, std > ++m_inSendSyncCount; > > // First send the message. >- OptionSet<SendOption> sendOptions = IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply; >- if (sendSyncOptions.contains(SendSyncOption::ForceDispatchWhenDestinationIsWaitingForUnboundedSyncReply)) >- sendOptions = sendOptions | IPC::SendOption::DispatchMessageEvenWhenWaitingForUnboundedSyncReply; >+ OptionSet<SendOption> sendOptions; >+ if (sendSyncOptions.contains(SendSyncOption::DispatchInReceiveOrder)) >+ ASSERT(!sendSyncOptions.contains(SendSyncOption::ForceDispatchWhenDestinationIsWaitingForUnboundedSyncReply)); >+ else { >+ sendOptions = sendOptions | IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply; >+ if (sendSyncOptions.contains(SendSyncOption::ForceDispatchWhenDestinationIsWaitingForUnboundedSyncReply)) >+ sendOptions = sendOptions | IPC::SendOption::DispatchMessageEvenWhenWaitingForUnboundedSyncReply; >+ } >+ > > auto messageName = encoder->messageName(); > sendMessage(WTFMove(encoder), sendOptions); >diff --git a/Source/WebKit/Platform/IPC/Connection.h b/Source/WebKit/Platform/IPC/Connection.h >index c04acf88045136a5d409eb0177083fb676d41560..6103c8d810d7c782acfdcc34a3b6a2b8fd66100e 100644 >--- a/Source/WebKit/Platform/IPC/Connection.h >+++ b/Source/WebKit/Platform/IPC/Connection.h >@@ -69,6 +69,14 @@ enum class SendSyncOption { > InformPlatformProcessWillSuspend = 1 << 0, > UseFullySynchronousModeForTesting = 1 << 1, > ForceDispatchWhenDestinationIsWaitingForUnboundedSyncReply = 1 << 2, >+ >+ // Dispatches the sent synchronous message and all previous and future asynchronous messages in the order they are received. >+ // Without this flag, the synchronous message might be reordered relative to asynchronous messages during >+ // synchronous message reply wait. >+ // Mutually exclusive with ForceDispatchWhenDestinationIsWaitingForUnboundedSyncReply. >+ // Note: causes timeouts if all parties in the synchronous message chain send synchronous messages with this flag >+ // to each other. >+ DispatchInReceiveOrder = 1 << 3, > }; > > enum class WaitForOption { >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h >index 54172fb0b516b639e9510964da3addad66a23af3..610eb015b513edfcf11809316fa82be4c4d7b5c6 100644 >--- a/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h >@@ -340,7 +340,7 @@ protected: > template<typename T> > WARN_UNUSED_RETURN IPC::Connection::SendSyncResult sendSync(T&& message, typename T::Reply&& reply) > { >- return connection().sendSync(WTFMove(message), WTFMove(reply), m_graphicsContextGLIdentifier.toUInt64(), defaultSendTimeout); >+ return connection().sendSync(WTFMove(message), WTFMove(reply), m_graphicsContextGLIdentifier.toUInt64(), defaultSendTimeout, IPC::SendSyncOption::DispatchInReceiveOrder); > } > IPC::Connection& connection() const { return m_gpuProcessConnection->connection(); } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 221488
:
419430
|
419886