Deprecate the old school callOnMainThread/cancelCallOnMainThread functions
Created attachment 259652 [details] Patch
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.
Created attachment 259653 [details] Patch
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.
Committed r188788: <http://trac.webkit.org/changeset/188788>
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.