[webkit-reviews] review requested: [Bug 213043] Unify some of RunLoop and callOnMainThread : [Attachment 401572] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 10 13:29:04 PDT 2020


Simon Fraser (smfr) <simon.fraser at apple.com> has asked	for review:
Bug 213043: Unify some of RunLoop and callOnMainThread
https://bugs.webkit.org/show_bug.cgi?id=213043

Attachment 401572: Patch

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




--- Comment #4 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 401572
  --> https://bugs.webkit.org/attachment.cgi?id=401572
Patch

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

> Source/WTF/wtf/cocoa/MainThreadCocoa.mm:107
> -	   [staticMainThreadCaller performSelector:@selector(call)
onThread:mainThreadNSThread withObject:nil waitUntilDone:NO];
> +	   RunLoop::web().dispatch([] {
> +	       WTF::dispatchFunctionsFromMainThread();
> +	   });

This seems wrong? The function is supposed to dispatch on the main thread.

> Source/WTF/wtf/cocoa/MainThreadCocoa.mm:119
> +    RunLoop::main().dispatch([] {
> +	   WTF::dispatchFunctionsFromMainThread();
> +    });

This also seems wrong.


More information about the webkit-reviews mailing list