[JSC] Work-around Leaks' false-positive report about memory leaking
Created attachment 383915 [details] Patch
<rdar://problem/56950932>
Comment on attachment 383915 [details] Patch r=me
Comment on attachment 383915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383915&action=review > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:425 > - g_jscConfig.fixedVMPoolExecutableAllocator = new FixedVMPoolExecutableAllocator(); > + auto* allocator = new FixedVMPoolExecutableAllocator(); > + g_jscConfig.fixedVMPoolExecutableAllocator = allocator; > + globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = allocator; You could just implement this as: g_jscConfig.fixedVMPoolExecutableAllocator = new FixedVMPoolExecutableAllocator(); globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = g_jscConfig.fixedVMPoolExecutableAllocator; That way, there's only a 1 line change that is easier to undo later. > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:657 > - g_jscConfig.executableAllocator = new ExecutableAllocator; > + auto* allocator = new ExecutableAllocator; > + g_jscConfig.executableAllocator = allocator; > + globalExecutableAllocatorToWorkAroundLeaks = allocator; Ditto.
Comment on attachment 383915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383915&action=review >> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:425 >> + globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = allocator; > > You could just implement this as: > g_jscConfig.fixedVMPoolExecutableAllocator = new FixedVMPoolExecutableAllocator(); > globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = g_jscConfig.fixedVMPoolExecutableAllocator; > > That way, there's only a 1 line change that is easier to undo later. Nice, fixed. >> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:657 >> + globalExecutableAllocatorToWorkAroundLeaks = allocator; > > Ditto. Fixed.
Committed r252661: <https://trac.webkit.org/changeset/252661>