Fix misleading comment in RunLoop.h. Mac initialization used to force using CFRunLoopGetMain(). Now however it just uses RunLoop::current which uses CFRunLoopGetCurrent(). So this comment that it can be done on any thread is misleading and can lead to incorrect behavior if it is actually done on a non-main thread on Mac.
Created attachment 300604 [details] [PATCH] Proposed Fix
Comment on attachment 300604 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=300604&action=review > Source/WTF/wtf/RunLoop.h:53 > + // Must be called from the main thread. On the Mac, this can be checked with an assertion (using pthread_main_np).
Created attachment 300643 [details] [PATCH] Proposed Fix
Comment on attachment 300643 [details] [PATCH] Proposed Fix Oh, that makes sense. WebKit1 will need some kind of "wait a beat".
Comment on attachment 300643 [details] [PATCH] Proposed Fix That comment was meant for another bug.
Comment on attachment 300643 [details] [PATCH] Proposed Fix Clearing flags on attachment: 300643 Committed r212139: <http://trac.webkit.org/changeset/212139>
All reviewed patches have been landed. Closing bug.
Re-opened since this is blocked by bug 168152
This revealed a few issues where non-main thread code triggers WebKit2Initialize and so could potentially be initializing the main run loop on a non-main thread (because WebKit2Initialize is not dispatch_once and always calls down into RunLoop::initializeMainThread). For example, this case in DumpRenderTree: (Bug 168149) https://bugs.webkit.org/show_bug.cgi?id=168149