Bug 116074

Summary: Objective-C API: scanExternalObjectGraph should not create new JSVirtualMachine wrappers
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Mark Hahnenberg 2013-05-13 16:30:47 PDT
If it does, when the scanExternalObjectGraph call finishes and the autorelease pool is drained, we will dealloc the JSVirtualMachine which will cause us to try to take the API lock for the corresponding VM. If this happens on a GC thread other than the "main" thread, we will deadlock. The solution is to just check the VM cache, and if there is no JSVirtualMachine wrapper, return early.
Comment 1 Mark Hahnenberg 2013-05-13 18:17:28 PDT
Created attachment 201659 [details]
Patch
Comment 2 Mark Hahnenberg 2013-05-13 18:18:15 PDT
<rdar://problem/13877067>
Comment 3 Mark Hahnenberg 2013-05-13 19:48:59 PDT
Committed r150050: <http://trac.webkit.org/changeset/150050>