Bug 105894 - Objective-C API: Objective-C functions exposed to JavaScript stop working after JSContext is released
Summary: Objective-C API: Objective-C functions exposed to JavaScript stop working aft...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Mark Hahnenberg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-01-01 00:11 PST by Gavin Barraclough
Modified: 2013-02-21 17:47 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2013-01-01 00:11:59 PST
Instead we should probably retain a marked reference to the JSGlobalObject, and allocate a new JSContext as necessary.
Comment 1 David Kilzer (:ddkilzer) 2013-01-23 12:23:19 PST
<rdar://problem/12954143>
Comment 2 Mark Hahnenberg 2013-02-21 17:24:11 PST
I believe this was fixed in http://trac.webkit.org/changeset/143637. I'll try to write a test to verify this.
Comment 3 Mark Hahnenberg 2013-02-21 17:47:02 PST
Actually we already get test coverage for this in the API tests from the aforementioned revision since they use setTimeout with Objective-C callbacks. I set a breakpoint in the code path that checks for null JSContexts in objCCallbackFunctionCallAsFunction and we hit it. So I think we can just close this bug.