Bug 148327 - Deprecate the old school callOnMainThread/cancelCallOnMainThread functions
Summary: Deprecate the old school callOnMainThread/cancelCallOnMainThread functions
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: 2015-08-21 13:51 PDT by Anders Carlsson
Modified: 2015-08-21 15:30 PDT (History)
3 users (show)

See Also:


Attachments
Patch (10.99 KB, patch)
2015-08-21 13:58 PDT, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (11.02 KB, patch)
2015-08-21 14:03 PDT, Anders Carlsson
sam: 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 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.