Port window.postMessage to the HTML event loop instead of using a 0-timer.
Created attachment 394116 [details] Patch
Created attachment 394127 [details] Patch
Comment on attachment 394127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394127&action=review > Source/WebCore/inspector/agents/WebDebuggerAgent.cpp:115 > +int WebDebuggerAgent::willPostMessage() Why don't we make m_nextPostMessageIdentifier unsigned and make this unsigned? I don't see any need for negative values anywhere.
(In reply to Alex Christensen from comment #3) > Comment on attachment 394127 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=394127&action=review > > > Source/WebCore/inspector/agents/WebDebuggerAgent.cpp:115 > > +int WebDebuggerAgent::willPostMessage() > > Why don't we make m_nextPostMessageIdentifier unsigned and make this > unsigned? I don't see any need for negative values anywhere. I don't disagree with you but this is not new. WebInspector was already using int as identifier type for those. We likely can switch to uint64_t but it will be more refactoring as it is being passed to WebInspector internals.
Comment on attachment 394127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394127&action=review > Source/WebCore/inspector/agents/WebDebuggerAgent.cpp:155 > + willDispatchAsyncCall(InspectorDebuggerAgent::AsyncCallType::PostMessage, postMessageIdentifier); and here the int is being passed below. > Source/WebCore/inspector/agents/WebDebuggerAgent.h:70 > int m_nextPostMessageIdentifier { 1 }; See int here..
Will look in a follow-up to see if I can easily switch that int into a uint64_t.
Committed r258850: <https://trac.webkit.org/changeset/258850> All reviewed patches have been landed. Closing bug and clearing flags on attachment 394127 [details].
<rdar://problem/60778822>