Bug 201947

Summary: Stop calling WTF::initializeMainThread() in JSGlobalContextCreate*()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: JavaScriptCoreAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, ggaren, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=201083
Bug Depends on:    
Bug Blocks: 200507    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2019-09-18 15:02:46 PDT
Stop calling WTF::initializeMainThread() in JSGlobalContextCreate*(). I started doing so in <https://trac.webkit.org/changeset/248533> but it is causing crashes for apps using this JS API on background threads. It is also no longer necessary as of <https://trac.webkit.org/changeset/249064>.
Comment 1 Chris Dumez 2019-09-18 15:03:04 PDT
<rdar://problem/55453612>
Comment 2 Chris Dumez 2019-09-18 15:04:47 PDT
Created attachment 379077 [details]
Patch
Comment 3 Mark Lam 2019-09-18 15:08:30 PDT
Comment on attachment 379077 [details]
Patch

r=me if bots are green.
Comment 4 Chris Dumez 2019-09-18 15:56:23 PDT
Comment on attachment 379077 [details]
Patch

Clearing flags on attachment: 379077

Committed r250062: <https://trac.webkit.org/changeset/250062>
Comment 5 Chris Dumez 2019-09-18 15:56:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Chris Dumez 2019-09-18 16:23:41 PDT
FYI, I am looking into writing an API test for this, to avoid this happening again in the future.