Bug 148327

Summary: Deprecate the old school callOnMainThread/cancelCallOnMainThread functions
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch sam: review+

Description Anders Carlsson 2015-08-21 13:51:55 PDT
Deprecate the old school callOnMainThread/cancelCallOnMainThread functions
Comment 1 Anders Carlsson 2015-08-21 13:58:09 PDT
Created attachment 259652 [details]
Patch
Comment 2 WebKit Commit Bot 2015-08-21 14:01:01 PDT
Attachment 259652 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/MainThread.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:123:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:147:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Anders Carlsson 2015-08-21 14:03:58 PDT
Created attachment 259653 [details]
Patch
Comment 4 WebKit Commit Bot 2015-08-21 14:05:57 PDT
Attachment 259653 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/MainThread.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:123:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:147:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Anders Carlsson 2015-08-21 15:06:34 PDT
Committed r188788: <http://trac.webkit.org/changeset/188788>
Comment 6 Darin Adler 2015-08-21 15:30:52 PDT
Comment on attachment 259653 [details]
Patch

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

> Source/WTF/wtf/MainThread.cpp:123
> +    std::function<void ()> function;

I think this should be declared inside the while loop.

> Source/WTF/wtf/MainThread.h:97
> +#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1090
> +WTF_EXPORT_PRIVATE void callOnMainThread(MainThreadFunction*, void* context);
> +WTF_EXPORT_PRIVATE void cancelCallOnMainThread(MainThreadFunction*, void* context);
> +#endif

I think the MainThreadFunction typedef should also be inside the #if. Or we can write void (*)(void*) instead of using a named type.