WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122698
Change callOnMainThread to take an std::function
https://bugs.webkit.org/show_bug.cgi?id=122698
Summary
Change callOnMainThread to take an std::function
Anders Carlsson
Reported
2013-10-12 11:58:16 PDT
Change callOnMainThread to take an std::function
Attachments
Patch
(2.78 KB, patch)
2013-10-12 12:01 PDT
,
Anders Carlsson
no flags
Details
Formatted Diff
Diff
Patch
(2.79 KB, patch)
2013-10-12 13:20 PDT
,
Anders Carlsson
darin
: review+
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2013-10-12 12:01:01 PDT
Created
attachment 214061
[details]
Patch
WebKit Commit Bot
Comment 2
2013-10-12 12:02:04 PDT
Attachment 214061
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/MainThread.cpp', u'Source/WTF/wtf/MainThread.h']" exit_code: 1 Source/WTF/wtf/MainThread.h:48: Extra space before ( in function call [whitespace/parens] [4] Source/WTF/wtf/MainThread.cpp:233: Extra space before ( in function call [whitespace/parens] [4] Source/WTF/wtf/MainThread.cpp:235: Place brace on its own line for function definitions. [whitespace/braces] [4] Source/WTF/wtf/MainThread.cpp:236: Extra space before ( in function call [whitespace/parens] [4] Source/WTF/wtf/MainThread.cpp:240: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 5 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 3
2013-10-12 12:41:40 PDT
Comment on
attachment 214061
[details]
Patch
Attachment 214061
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/3582033
Anders Carlsson
Comment 4
2013-10-12 13:20:18 PDT
Created
attachment 214063
[details]
Patch
WebKit Commit Bot
Comment 5
2013-10-12 13:22:24 PDT
Attachment 214063
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/MainThread.cpp', u'Source/WTF/wtf/MainThread.h']" exit_code: 1 Source/WTF/wtf/MainThread.h:48: Extra space before ( in function call [whitespace/parens] [4] Source/WTF/wtf/MainThread.cpp:233: Extra space before ( in function call [whitespace/parens] [4] Source/WTF/wtf/MainThread.cpp:235: Place brace on its own line for function definitions. [whitespace/braces] [4] Source/WTF/wtf/MainThread.cpp:236: Extra space before ( in function call [whitespace/parens] [4] Source/WTF/wtf/MainThread.cpp:240: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 5 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 6
2013-10-12 14:59:39 PDT
Comment on
attachment 214063
[details]
Patch
Attachment 214063
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/3788079
Darin Adler
Comment 7
2013-10-12 16:25:37 PDT
Comment on
attachment 214063
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=214063&action=review
>> Source/WTF/wtf/MainThread.cpp:240 >> + callOnMainThread(+callFunctionObject, std::make_unique<std::function<void ()>>(std::move(function)).release()); > > Extra space before ( in function call [whitespace/parens] [4]
What does the "+" here mean? Whatever it means, it seems that Windows does not understand it: 1>..\wtf\MainThread.cpp(240): error C2675: unary '+' : 'WTF::`anonymous-namespace'::<lambda0>' does not define this operator or a conversion to a type acceptable to the predefined operator
Anders Carlsson
Comment 8
2013-10-13 09:07:01 PDT
(In reply to
comment #7
)
> (From update of
attachment 214063
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=214063&action=review
> > >> Source/WTF/wtf/MainThread.cpp:240 > >> + callOnMainThread(+callFunctionObject, std::make_unique<std::function<void ()>>(std::move(function)).release()); > > > > Extra space before ( in function call [whitespace/parens] [4] > > What does the "+" here mean? Whatever it means, it seems that Windows does not understand it: > > 1>..\wtf\MainThread.cpp(240): error C2675: unary '+' : 'WTF::`anonymous-namespace'::<lambda0>' does not define this operator or a conversion to a type acceptable to the predefined operator
It explictly converts the lambda to a function pointer. Looks like MSVC doesn't support converting lambdas to function pointers, so I'm going to have to use a regular function instead.
Anders Carlsson
Comment 9
2013-10-13 09:11:46 PDT
Committed
r157374
: <
http://trac.webkit.org/changeset/157374
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug