[webkit-reviews] review granted: [Bug 213051] Some style improvements to main thread code : [Attachment 401591] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 10 16:12:46 PDT 2020


Darin Adler <darin at apple.com> has granted Geoffrey Garen <ggaren at apple.com>'s
request for review:
Bug 213051: Some style improvements to main thread code
https://bugs.webkit.org/show_bug.cgi?id=213051

Attachment 401591: Patch

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




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 401591
  --> https://bugs.webkit.org/attachment.cgi?id=401591
Patch

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

> Source/WTF/wtf/cocoa/MainThreadCocoa.mm:61
> +static pthread_t s_webThreadPthread { nullptr };

The "{ nullptr }" has no effect or value here.

> Source/WTF/wtf/cocoa/MainThreadCocoa.mm:106
> +    if (RunLoop::webIfExists()) {
>	   RunLoop::web().dispatch(dispatchFunctionsFromMainThread);
>	   return;
>      }

Why get it twice? Put it in a local variable and use it?

> Source/WebKit/Shared/WebKit2Initialize.cpp:43
>      JSC::initializeThreading();
> -    RunLoop::initializeMainRunLoop();
> +    RunLoop::initializeMain();

Is there any reason that these are two separate function calls that both need
to be called in each location? If JSC::initializeThreading called
RunLoop::initializeMain, what would go wrong?


More information about the webkit-reviews mailing list