Bug 1457703 - Fix count of compacting update tasks started r=sfink a=abillings
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 10 May 2018 10:09:23 +0100
changeset 417704 aebec628c235cbca95ff33731935a3b3bfe1c8f2
parent 417703 f75ee4da0e5d95209faa2bbd1d5aa4bde1d94d3d
child 417705 9b7cc103ce95050f733244b0ac10f8870b6cb01f
push id33977
push userncsoregi@mozilla.com
push dateThu, 10 May 2018 16:43:24 +0000
treeherdermozilla-central@17db33b6a124 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink, abillings
bugs1457703
milestone62.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 1457703 - Fix count of compacting update tasks started r=sfink a=abillings
js/src/gc/GC.cpp
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -2813,27 +2813,29 @@ GCRuntime::updateCellPointers(Zone* zone
     {
         AutoLockHelperThreadState lock;
 
         fgTask.emplace(rt, &fgArenas, lock);
 
         for (size_t i = 0; i < bgTaskCount && !bgArenas.done(); i++) {
             bgTasks[i].emplace(rt, &bgArenas, lock);
             startTask(*bgTasks[i], gcstats::PhaseKind::COMPACT_UPDATE_CELLS, lock);
-            tasksStarted = i;
+            tasksStarted++;
         }
     }
 
     fgTask->runFromMainThread(rt);
 
     {
         AutoLockHelperThreadState lock;
 
         for (size_t i = 0; i < tasksStarted; i++)
             joinTask(*bgTasks[i], gcstats::PhaseKind::COMPACT_UPDATE_CELLS, lock);
+        for (size_t i = tasksStarted; i < MaxCellUpdateBackgroundTasks; i++)
+            MOZ_ASSERT(bgTasks[i].isNothing());
     }
 }
 
 // After cells have been relocated any pointers to a cell's old locations must
 // be updated to point to the new location.  This happens by iterating through
 // all cells in heap and tracing their children (non-recursively) to update
 // them.
 //