Bug 105894
Summary: | Objective-C API: Objective-C functions exposed to JavaScript stop working after JSContext is released | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> |
Component: | JavaScriptCore | Assignee: | Mark Hahnenberg <mhahnenberg> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ggaren, mhahnenberg |
Priority: | P1 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Gavin Barraclough
Instead we should probably retain a marked reference to the JSGlobalObject, and allocate a new JSContext as necessary.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
<rdar://problem/12954143>
Mark Hahnenberg
I believe this was fixed in http://trac.webkit.org/changeset/143637. I'll try to write a test to verify this.
Mark Hahnenberg
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.