Bug 128959

Summary: [iOS] Web Inspector: JSContext inspection crashes in isMainThread, uninitialized WebCoreWebThreadIsLockedOrDisabled
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, ddkilzer, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2014-02-18 00:24:30 PST
An iOS Application can use JavaScriptCore / JSContext without WebKit. In this path, the WTF WebCoreWebThread functions have not been initialized yet, and isMainThread with USE(WEB_THREAD) assumes it is and calls WebCoreWebThreadIsLockedOrDisabled and causes a crash. We should not assume that the function pointer has been filled in, as will be the case when this is used outside of a web environment.
Comment 1 Radar WebKit Bug Importer 2014-02-18 00:25:02 PST
<rdar://problem/16095242>
Comment 2 Joseph Pecoraro 2014-02-18 00:30:18 PST
Created attachment 224478 [details]
[PATCH] Proposed Fix
Comment 3 David Kilzer (:ddkilzer) 2014-02-18 11:14:02 PST
Comment on attachment 224478 [details]
[PATCH] Proposed Fix

r=me
Comment 4 WebKit Commit Bot 2014-02-18 11:45:46 PST
Comment on attachment 224478 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 224478

Committed r164301: <http://trac.webkit.org/changeset/164301>
Comment 5 WebKit Commit Bot 2014-02-18 11:45:48 PST
All reviewed patches have been landed.  Closing bug.