Don't leak JITScript->shimPool, bug 720359. r=dvander
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 23 Jan 2012 16:35:12 -0800
changeset 85152 3e8c74abc6e569faaa93acf650205798f7aac7c3
parent 85151 f8d4887aae8df037b0c8a45b3349601c21f958b5
child 85153 c797a7c680234faf8182b349b0ee54a794f398dd
push id5200
push userbhackett@mozilla.com
push dateTue, 24 Jan 2012 00:35:27 +0000
treeherdermozilla-inbound@3e8c74abc6e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs720359
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Don't leak JITScript->shimPool, bug 720359. r=dvander
js/src/methodjit/MethodJIT.cpp
--- a/js/src/methodjit/MethodJIT.cpp
+++ b/js/src/methodjit/MethodJIT.cpp
@@ -1291,16 +1291,19 @@ JITChunk::~JITChunk()
 #endif
 }
 
 void
 JITScript::destroy(JSContext *cx)
 {
     for (unsigned i = 0; i < nchunks; i++)
         destroyChunk(cx, i);
+
+    if (shimPool)
+        shimPool->release();
 }
 
 void
 JITScript::destroyChunk(JSContext *cx, unsigned chunkIndex, bool resetUses)
 {
     ChunkDescriptor &desc = chunkDescriptor(chunkIndex);
 
     if (desc.chunk) {