RESOLVED FIXED 209359
Port window.postMessage to the HTML event loop
https://bugs.webkit.org/show_bug.cgi?id=209359
Summary Port window.postMessage to the HTML event loop
Chris Dumez
Reported 2020-03-20 13:24:08 PDT
Port window.postMessage to the HTML event loop instead of using a 0-timer.
Attachments
Patch (21.90 KB, patch)
2020-03-20 13:25 PDT, Chris Dumez
no flags
Patch (29.97 KB, patch)
2020-03-20 14:24 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2020-03-20 13:25:28 PDT
Chris Dumez
Comment 2 2020-03-20 14:24:17 PDT
Alex Christensen
Comment 3 2020-03-20 16:12:39 PDT
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.
Chris Dumez
Comment 4 2020-03-20 16:14:12 PDT
(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.
Chris Dumez
Comment 5 2020-03-20 16:15:09 PDT
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..
Chris Dumez
Comment 6 2020-03-20 16:19:05 PDT
Will look in a follow-up to see if I can easily switch that int into a uint64_t.
EWS
Comment 7 2020-03-23 09:51:30 PDT
Committed r258850: <https://trac.webkit.org/changeset/258850> All reviewed patches have been landed. Closing bug and clearing flags on attachment 394127 [details].
Radar WebKit Bug Importer
Comment 8 2020-03-23 09:52:19 PDT
Note You need to log in before you can comment on or make changes to this bug.