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 208209 0b7a5bba0115ea18d68f19619f6e238082e16e16
parent 208208 f0a87ca6c29dac1c39c0b024cfc45a2da22bceef
child 208210 042efa0757405a246c93e904b274679287197bce
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [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