Bug 920782 - Don't trigger GCs from threads with an exclusive context, r=billm.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 27 Sep 2013 10:44:25 -0600
changeset 149017 696af256f174ea920a7bfa06b05d92ab9e58facc
parent 149016 2fa2ebce623b6a2aa84dba7814cfd662cfcd6b6d
child 149018 2cf806c4ef2ab2b84335f97ed2491ee5acd8c87f
push id25366
push userkwierso@gmail.com
push dateSat, 28 Sep 2013 02:13:38 +0000
treeherdermozilla-central@e1914e294152 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs920782
milestone27.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
Bug 920782 - Don't trigger GCs from threads with an exclusive context, r=billm.
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -1954,16 +1954,20 @@ js::TriggerZoneGC(Zone *zone, JS::gcreas
      * If parallel threads are running, wait till they
      * are stopped to trigger GC.
      */
     if (InParallelSection()) {
         ForkJoinSlice::Current()->requestZoneGC(zone, reason);
         return;
     }
 
+    /* Zones in use by a thread with an exclusive context can't be collected. */
+    if (zone->usedByExclusiveThread)
+        return;
+
     JSRuntime *rt = zone->runtimeFromMainThread();
 
     /* Don't trigger GCs when allocating under the operation callback lock. */
     if (rt->currentThreadOwnsOperationCallbackLock())
         return;
 
     if (rt->isHeapBusy())
         return;