Summary: JSWrapperMap leaks for all JSContexts Test: /* * shell> xcrun clang -framework Foundation -framework JavaScriptCore js-leak.m */ #import <Foundation/Foundation.h> #import <JavaScriptCore/JavaScriptCore.h> int main() { @autoreleasepool { [[[JSContext alloc] init] autorelease]; } [[NSRunLoop mainRunLoop] run]; return 0; } Steps to Reproduce: 1. $ xcrun clang -framework Foundation -framework JavaScriptCore js-leak.m 2. $ MallocStackLogging=1 DYLD_FRAMEWORK_PATH=$build/Release ./a.out 3. $ leaks `pidof a.out` => Leaks Leak: Leak: 0x7f9b18100ce0 size=32 zone: DefaultMallocZone_0x10ecb8000 JSWrapperMap ObjC JavaScriptCore 0x0e58d0f5 0x001d8001 0x181008d0 0x00007f9b ..X............. 0x186125c0 0x00007f9b 0x18100ec0 0x00007f9b .%a............. Call stack: [thread 0x7fffb956e3c0]: | start | main | -[JSContext initWithVirtualMachine:] JSContext.mm:79 | -[JSContext ensureWrapperMap] JSContext.mm:57 | _objc_rootAlloc | class_createInstance | calloc
<rdar://problem/32602198>
Created attachment 312342 [details] [PATCH] Proposed Fix
Comment on attachment 312342 [details] [PATCH] Proposed Fix r=me
Comment on attachment 312342 [details] [PATCH] Proposed Fix Clearing flags on attachment: 312342 Committed r217952: <http://trac.webkit.org/changeset/217952>
All reviewed patches have been landed. Closing bug.