Bug 161504 - add BlockPtr::fromCallable
Summary: add BlockPtr::fromCallable
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: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-01 13:07 PDT by Anders Carlsson
Modified: 2016-09-01 13:42 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.82 KB, patch)
2016-09-01 13:10 PDT, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (10.03 KB, patch)
2016-09-01 13:32 PDT, Anders Carlsson
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2016-09-01 13:07:49 PDT
add BlockPtr::fromCallable
Comment 1 Anders Carlsson 2016-09-01 13:10:11 PDT
Created attachment 287663 [details]
Patch
Comment 2 WebKit Commit Bot 2016-09-01 13:12:59 PDT
Attachment 287663 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/Tests/WTF/BlockPtr.mm:35:  No space between ^ and block definition.  [whitespace/brackets] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/BlockPtr.mm:45:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2016-09-01 13:24:58 PDT
Comment on attachment 287663 [details]
Patch

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

> Source/WTF/ChangeLog:8
> +        BlockPtr::fromCallable lets you create an Objective-C from any callable object - including lambdas that contain move-only types.

"create an Objective-C from"?

> Source/WTF/wtf/BlockPtr.h:77
> +        block->flags = 0x3000002;

wat
Comment 4 Anders Carlsson 2016-09-01 13:32:26 PDT
Created attachment 287668 [details]
Patch
Comment 5 WebKit Commit Bot 2016-09-01 13:35:12 PDT
Attachment 287668 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/Tests/WTF/BlockPtr.mm:35:  No space between ^ and block definition.  [whitespace/brackets] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/BlockPtr.mm:45:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Anders Carlsson 2016-09-01 13:42:18 PDT
Committed r205313: <http://trac.webkit.org/changeset/205313>