[webkit-reviews] review granted: [Bug 213612] WTF::callOnMainThread should not require the main runloop to be initialized : [Attachment 402751] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 25 11:37:52 PDT 2020


Yusuke Suzuki <ysuzuki at apple.com> has granted Tadeu Zagallo
<tzagallo at apple.com>'s request for review:
Bug 213612: WTF::callOnMainThread should not require the main runloop to be
initialized
https://bugs.webkit.org/show_bug.cgi?id=213612

Attachment 402751: Patch

https://bugs.webkit.org/attachment.cgi?id=402751&action=review




--- Comment #3 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 402751
  --> https://bugs.webkit.org/attachment.cgi?id=402751
Patch

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

r=me

> Source/WTF/wtf/cocoa/MainThreadCocoa.mm:134
> +    if (RunLoop::mainIfExists()) {
> +	   RunLoop::main().dispatch(dispatchFunctionsFromMainThread);
> +	   return;
> +    }

Let's ensure that `s_mainRunLoop` is set after initializing RunLoop fully by
inserting `WTF::storeStoreFence()` before `s_mainRunLoop =
&RunLoop::current()`.


More information about the webkit-reviews mailing list