RESOLVED FIXED 234883
WorkerMessagePortChannelProvider::takeAllMessagesForPort should guarantee execution of the takeMessagePort callback
https://bugs.webkit.org/show_bug.cgi?id=234883
Summary WorkerMessagePortChannelProvider::takeAllMessagesForPort should guarantee exe...
youenn fablet
Reported 2022-01-05 08:11:18 PST
WorkerMessagePortChannelProvider::takeAllMessagesForPort should guarantee execution of the takeMessagePort callback
Attachments
Patch (3.95 KB, patch)
2022-01-05 08:14 PST, youenn fablet
no flags
Patch for landing (3.97 KB, patch)
2022-01-06 02:04 PST, youenn fablet
no flags
youenn fablet
Comment 1 2022-01-05 08:11:30 PST
youenn fablet
Comment 2 2022-01-05 08:14:28 PST
Alex Christensen
Comment 3 2022-01-05 11:42:08 PST
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
youenn fablet
Comment 4 2022-01-06 01:33:43 PST
(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.
youenn fablet
Comment 5 2022-01-06 02:04:14 PST
Created attachment 448473 [details] Patch for landing
EWS
Comment 6 2022-01-06 02:51:10 PST
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].
Note You need to log in before you can comment on or make changes to this bug.