Bug 956671 - Don't iterate over all compartments in Debugger::sweepAll(), only those in the current zone group r=billm
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 07 Jan 2014 10:34:25 +0000
changeset 162347 34b3cb13258b5a4af8e9304f9e0fb629f574dfa1
parent 162346 f3f667c17c26d92a477a5c70cda430bf697adbf2
child 162348 34a1652e8f528752ee7730e38421419edcf601ef
push idunknown
push userunknown
push dateunknown
reviewersbillm
bugs956671
milestone29.0a1
Bug 956671 - Don't iterate over all compartments in Debugger::sweepAll(), only those in the current zone group r=billm
js/src/vm/Debugger.cpp
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -1630,17 +1630,17 @@ Debugger::sweepAll(FreeOp *fop)
              * might be GC'd too. Since detaching requires access to both
              * objects, this must be done before finalize time.
              */
             for (GlobalObjectSet::Enum e(dbg->debuggees); !e.empty(); e.popFront())
                 dbg->removeDebuggeeGlobal(fop, e.front(), nullptr, &e);
         }
     }
 
-    for (gc::GCCompartmentsIter comp(rt); !comp.done(); comp.next()) {
+    for (gc::GCCompartmentGroupIter comp(rt); !comp.done(); comp.next()) {
         /* For each debuggee being GC'd, detach it from all its debuggers. */
         GlobalObjectSet &debuggees = comp->getDebuggees();
         for (GlobalObjectSet::Enum e(debuggees); !e.empty(); e.popFront()) {
             GlobalObject *global = e.front();
             if (IsObjectAboutToBeFinalized(&global))
                 detachAllDebuggersFromGlobal(fop, global, &e);
             else if (global != e.front())
                 e.rekeyFront(global);