WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
213051
Some style improvements to main thread code
https://bugs.webkit.org/show_bug.cgi?id=213051
Summary
Some style improvements to main thread code
Geoffrey Garen
Reported
2020-06-10 15:10:21 PDT
Some style improvements to main thread code
Attachments
Patch
(23.60 KB, patch)
2020-06-10 15:23 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(33.69 KB, patch)
2020-06-10 15:32 PDT
,
Geoffrey Garen
darin
: review+
Details
Formatted Diff
Diff
Patch for landing
(33.71 KB, patch)
2020-06-10 16:43 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2020-06-10 15:23:56 PDT
Created
attachment 401590
[details]
Patch
Geoffrey Garen
Comment 2
2020-06-10 15:32:45 PDT
Created
attachment 401591
[details]
Patch
Darin Adler
Comment 3
2020-06-10 16:12:46 PDT
Comment on
attachment 401591
[details]
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?
Geoffrey Garen
Comment 4
2020-06-10 16:21:48 PDT
> > 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?
JSC::initializeThreading can be called on any thread. RunLoop::initializeMain must be called on the main thread. But maybe we could add a JSC::initializeMain() convenience function to do both from the main thread.
Geoffrey Garen
Comment 5
2020-06-10 16:43:21 PDT
Created
attachment 401603
[details]
Patch for landing
EWS
Comment 6
2020-06-10 17:15:11 PDT
Committed
r262878
: <
https://trac.webkit.org/changeset/262878
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 401603
[details]
.
Radar WebKit Bug Importer
Comment 7
2020-06-10 17:16:22 PDT
<
rdar://problem/64231824
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug