Bug 1288823, part 1 - Use doSweep more consistently in XPCJSRuntime::FinalizeCallback. r=mrbkap
authorAndrew McCreight <continuation@gmail.com>
Mon, 25 Jul 2016 16:32:55 -0700
changeset 331656 76dd054b8a00d071be959792d2d228b4c30d4f0f
parent 331655 b558126227ac34a1249a4b6d53671fc2c2f6fa24
child 331657 9b1b7128fc7b944658555e3337a800fc59c744ee
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1288823
milestone50.0a1
Bug 1288823, part 1 - Use doSweep more consistently in XPCJSRuntime::FinalizeCallback. r=mrbkap
js/xpconnect/src/XPCJSRuntime.cpp
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -837,17 +837,17 @@ XPCJSRuntime::FinalizeCallback(JSFreeOp*
                         shared->Unmark();
                     } else if (doSweep) {
                         delete shared;
                         i.Remove();
                     }
                 }
             }
 
-            if (!isCompartmentGC) {
+            if (doSweep) {
                 for (auto i = self->mClassInfo2NativeSetMap->Iter(); !i.Done(); i.Next()) {
                     auto entry = static_cast<ClassInfo2NativeSetMap::Entry*>(i.Get());
                     if (!entry->value->IsMarked())
                         i.Remove();
                 }
             }
 
             for (auto i = self->mNativeSetMap->Iter(); !i.Done(); i.Next()) {