WorkerMessagePortChannelProvider::takeAllMessagesForPort should guarantee execution of the takeMessagePort callback
<rdar://86708232>
Created attachment 448388 [details] Patch
Comment on attachment 448388 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448388&action=review > Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp:110 > + Function<void()> m_completionHandler; Can this be a CompletionHandler? > Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp:119 > MessagePortChannelProvider::singleton().takeAllMessagesForPort(identifier, [this, workerThread = WTFMove(workerThread), callbackIdentifier](Vector<MessageWithMessagePorts>&& messages, Function<void()>&& completionHandler) { ditto
(In reply to Alex Christensen from comment #3) > Comment on attachment 448388 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=448388&action=review > > > Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp:110 > > + Function<void()> m_completionHandler; > > Can this be a CompletionHandler? Yes, will change it. > > Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp:119 > > MessagePortChannelProvider::singleton().takeAllMessagesForPort(identifier, [this, workerThread = WTFMove(workerThread), callbackIdentifier](Vector<MessageWithMessagePorts>&& messages, Function<void()>&& completionHandler) { > > ditto It seems so, and this might be good given that probably makes sure we do not accumulate data in the networking process. We should do that in a separate patch though.
Created attachment 448473 [details] Patch for landing
Committed r287679 (245776@main): <https://commits.webkit.org/245776@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448473 [details].