Bug 169818 - Make SocketStreamHandle virtual functions asynchronous
Summary: Make SocketStreamHandle virtual functions asynchronous
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-17 11:00 PDT by Alex Christensen
Modified: 2017-03-17 13:31 PDT (History)
1 user (show)

See Also:


Attachments
Patch (20.81 KB, patch)
2017-03-17 11:08 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (20.77 KB, patch)
2017-03-17 12:11 PDT, Alex Christensen
aestes: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2017-03-17 11:00:27 PDT
Make SocketStreamHandle virtual functions asynchronous
Comment 1 Alex Christensen 2017-03-17 11:08:28 PDT
Created attachment 304799 [details]
Patch
Comment 2 Alex Christensen 2017-03-17 12:11:36 PDT
Created attachment 304807 [details]
Patch
Comment 3 Andy Estes 2017-03-17 13:15:48 PDT
Comment on attachment 304807 [details]
Patch

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

> Source/WebCore/platform/network/SocketStreamHandle.h:55
> +    virtual void platformSend(const char* data, size_t length, Function<void(bool)>) = 0;

Why not make the Function an rvalue reference?
Comment 4 Brady Eidson 2017-03-17 13:18:44 PDT
(In reply to comment #3)
> Comment on attachment 304807 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=304807&action=review
> 
> > Source/WebCore/platform/network/SocketStreamHandle.h:55
> > +    virtual void platformSend(const char* data, size_t length, Function<void(bool)>) = 0;
> 
> Why not make the Function an rvalue reference?

In fact, for general use you'd *have too*, because Functions are non copyable.
Comment 5 Alex Christensen 2017-03-17 13:31:23 PDT
I don't have to, but I did.
http://trac.webkit.org/r214114