Bug 181205 - Make MessagePortChannel::takeAllMessagesFromRemote asynchronous
Summary: Make MessagePortChannel::takeAllMessagesFromRemote asynchronous
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks: 181178
  Show dependency treegraph
 
Reported: 2018-01-01 10:16 PST by Brady Eidson
Modified: 2018-01-09 09:10 PST (History)
8 users (show)

See Also:


Attachments
Patch (4.28 KB, text/plain)
2018-01-01 17:54 PST, Brady Eidson
no flags Details
Patch (5.26 KB, patch)
2018-01-02 14:14 PST, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff
Patch (5.44 KB, patch)
2018-01-02 15:44 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2018-01-01 10:16:44 PST
Make MessagePortChannel::takeAllMessagesFromRemote asynchronous
Comment 1 Brady Eidson 2018-01-01 17:54:42 PST
Created attachment 330303 [details]
Patch

This patch relies on another one currently in the review queue - Won't submit to EWS until after it lands.
Comment 2 Brady Eidson 2018-01-02 14:14:05 PST
Created attachment 330333 [details]
Patch

Will not mark as patch until the patch in 181172 lands
Comment 3 Alex Christensen 2018-01-02 14:47:43 PST
Comment on attachment 330333 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=330333&action=review

> Source/WebCore/dom/MessagePort.cpp:206
> +    m_entangledChannel->takeAllMessagesFromRemote([protectedThis = makeRef(*this), this](Deque<std::unique_ptr<MessagePortChannel::EventData>>&& messages) {

I like to capture this first.  I don't think we've discussed this style.  Pun intended.

> Source/WebCore/dom/MessagePortChannel.h:70
> +    virtual void takeAllMessagesFromRemote(WTF::Function<void(Deque<std::unique_ptr<EventData>>&&)>&&) = 0;

We shouldn't need the WTF:: prefix since r222473.  This could also be a CompletionHandler.
Comment 4 Brady Eidson 2018-01-02 15:44:21 PST
Created attachment 330346 [details]
Patch
Comment 5 WebKit Commit Bot 2018-01-02 16:51:04 PST
Comment on attachment 330346 [details]
Patch

Clearing flags on attachment: 330346

Committed r226343: <https://trac.webkit.org/changeset/226343>
Comment 6 Radar WebKit Bug Importer 2018-01-09 09:10:25 PST
<rdar://problem/36376756>