Don't leak JITScript->shimPool, bug 720359. r=dvander
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 23 Jan 2012 16:35:12 -0800
changeset 86383 3e8c74abc6e569faaa93acf650205798f7aac7c3
parent 86382 f8d4887aae8df037b0c8a45b3349601c21f958b5
child 86384 c797a7c680234faf8182b349b0ee54a794f398dd
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs720359
milestone12.0a1
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) {