Bug 1350844 - Don't add dead proxy zone edges for zones which are not being collected r=sfink a=gchang
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 31 Mar 2017 11:16:42 +0100
changeset 395611 f26e2606488b9e01e63bdb8670d22bb8da77b4d2
parent 395610 eb51d84e5209a5c69547f8b45bc908417c352fa7
child 395612 cabc0989190a4bd1343748942e0b8011e4a00c83
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink, gchang
bugs1350844
milestone54.0a2
Bug 1350844 - Don't add dead proxy zone edges for zones which are not being collected r=sfink a=gchang
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -4459,17 +4459,20 @@ JSCompartment::findDeadProxyZoneEdges(bo
     // wrappers do not need to be scanned.
     *foundAny = false;
     for (js::WrapperMap::Enum e(crossCompartmentWrappers); !e.empty(); e.popFront()) {
         Value value = e.front().value().get();
         if (value.isObject()) {
             if (IsDeadProxyObject(&value.toObject())) {
                 *foundAny = true;
                 CrossCompartmentKey& key = e.front().mutableKey();
-                if (!key.as<JSObject*>()->zone()->gcZoneGroupEdges().put(zone()))
+                Zone* wrapperZone = key.as<JSObject*>()->zone();
+                if (!wrapperZone->isGCMarking())
+                    continue;
+                if (!wrapperZone->gcZoneGroupEdges().put(zone()))
                     return false;
             }
         }
     }
 
     return true;
 }