Bug 1022027 - Fix leak in off-main-thread parsing. r=bhackett, a=lmandel
authorLuke Wagner <luke@mozilla.com>
Tue, 10 Jun 2014 10:43:05 -0500
changeset 207125 0b7a5bba0115ea18d68f19619f6e238082e16e16
parent 207124 f0a87ca6c29dac1c39c0b024cfc45a2da22bceef
child 207126 042efa0757405a246c93e904b274679287197bce
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett, lmandel
bugs1022027
milestone32.0a2
Bug 1022027 - Fix leak in off-main-thread parsing. r=bhackett, a=lmandel
js/src/vm/HelperThreads.cpp
--- a/js/src/vm/HelperThreads.cpp
+++ b/js/src/vm/HelperThreads.cpp
@@ -628,16 +628,17 @@ GlobalHelperThreadState::finishParseTask
                 break;
             }
         }
     }
     JS_ASSERT(parseTask);
 
     // Mark the zone as no longer in use by an ExclusiveContext, and available
     // to be collected by the GC.
+    parseTask->cx->leaveCompartment(parseTask->cx->compartment());
     rt->clearUsedByExclusiveThread(parseTask->cx->zone());
     if (!maybecx) {
         return nullptr;
     }
     JSContext *cx = maybecx;
     JS_ASSERT(cx->compartment());
 
     // Make sure we have all the constructors we need for the prototype