Bug 161504

Summary: add BlockPtr::fromCallable
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch thorton: review+

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>