Bug 128959 - [iOS] Web Inspector: JSContext inspection crashes in isMainThread, uninitialized WebCoreWebThreadIsLockedOrDisabled
Summary: [iOS] Web Inspector: JSContext inspection crashes in isMainThread, uninitiali...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-02-18 00:24 PST by Joseph Pecoraro
Modified: 2014-02-18 11:45 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.23 KB, patch)
2014-02-18 00:30 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.