Bug 137570 - Remove CrossThreadTask
Summary: Remove CrossThreadTask
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
Depends on:
Reported: 2014-10-09 13:32 PDT by Zan Dobersek
Modified: 2014-10-10 05:15 PDT (History)
0 users

See Also:

Patch (37.56 KB, patch)
2014-10-09 13:37 PDT, Zan Dobersek
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2014-10-09 13:32:13 PDT
C++11 lambdas can be used instead.
Comment 1 Zan Dobersek 2014-10-09 13:37:24 PDT
Created attachment 239565 [details]
Comment 2 Darin Adler 2014-10-09 14:48:14 PDT
Comment on attachment 239565 [details]

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

> Source/WebCore/ChangeLog:10
> +        Replace uses of CrossThreadTask with C++11 lambdas. The initializations
> +        of cross-thread copies are rather verbose at the moment, but should look
> +        better once we can switch to using C++14 init capture for lambdas.

Anders is also working on a project that might lead to cross-thread-safe reference counting for String. If he succeeds, that will also make many of them considerably better.

> Source/WebCore/loader/WorkerThreadableLoader.h:108
> +                virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;

Looks like this is indented four spaces too far.
Comment 3 Zan Dobersek 2014-10-10 05:15:53 PDT
Committed r174583: <http://trac.webkit.org/changeset/174583>