Summary: | Make it possible for waitForAndDispatchImmediately to bail if a sync message comes in from the other direction | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||||
Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | andersca, ap, sam, simon.fraser | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Tim Horton
2014-06-10 16:57:56 PDT
Created attachment 232833 [details]
patch
Created attachment 232834 [details]
patch
Comment on attachment 232834 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=232834&action=review > Source/WebKit2/Platform/IPC/Connection.cpp:392 > + WaitForMessageInfo waitingForMessage(messageReceiverName, messageName, destinationID, flags); There's still no run loop assertion here! > Source/WebKit2/Platform/IPC/Connection.h:172 > + template<typename T> bool waitForAndDispatchImmediately(uint64_t destinationID, std::chrono::milliseconds timeout, WaitForMessageFlags = (WaitForMessageFlags)0); Please use an unsigned instead of the cast. > Source/WebKit2/Platform/IPC/Connection.h:280 > + struct WaitForMessageInfo { > + WaitForMessageInfo(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, WaitForMessageFlags flags) > + : messageReceiverName(messageReceiverName) > + , messageName(messageName) > + , destinationID(destinationID) > + , waitForMessageFlags(flags) > + { } > + > + StringReference messageReceiverName; > + StringReference messageName; > + uint64_t destinationID; > + > + WaitForMessageFlags waitForMessageFlags; > + bool messageWaitingInterrupted = false; > + > + std::unique_ptr<MessageDecoder> decoder; > + }; > + > + WaitForMessageInfo* m_waitingForMessage; I think you can forward declare this and just stick it in the .cpp file. Maybe call it WaitForMessageState? Created attachment 232891 [details]
anders changes
Comment on attachment 232891 [details] anders changes View in context: https://bugs.webkit.org/attachment.cgi?id=232891&action=review > Source/WebKit2/Platform/IPC/Connection.cpp:45 > + { } Newline after { > Source/WebKit2/Platform/IPC/Connection.cpp:428 > + std::unique_ptr<MessageDecoder> decoder = std::move(m_waitingForMessage->decoder); auto decoder = |