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+

Mark Hahnenberg
Reported 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.
Attachments
Patch (1.96 KB, patch)
2013-05-13 18:17 PDT, Mark Hahnenberg
darin: review+
Mark Hahnenberg
Comment 1 2013-05-13 18:17:28 PDT
Mark Hahnenberg
Comment 2 2013-05-13 18:18:15 PDT
Mark Hahnenberg
Comment 3 2013-05-13 19:48:59 PDT
Note You need to log in before you can comment on or make changes to this bug.