Bug 1020800 - Check for correct thread after checking if GC is suppressed. (r=terrence)
authorShu-yu Guo <shu@rfrn.org>
Thu, 05 Jun 2014 15:10:33 -0700
changeset 207284 bb9909b6258ae69817f17134495bf249483850ba
parent 207283 4c794b0e6e9cba4324152562377df20d2d0d5931
child 207285 0869b8d56014b6587b6be5e60cf1d77c9afe1cc6
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1020800
milestone32.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 1020800 - Check for correct thread after checking if GC is suppressed. (r=terrence)
js/src/gc/Nursery.cpp
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -731,21 +731,21 @@ CheckHashTablesAfterMovingGC(JSRuntime *
 #define TIME_START(name)
 #define TIME_END(name)
 #define TIME_TOTAL(name)
 #endif
 
 void
 js::Nursery::collect(JSRuntime *rt, JS::gcreason::Reason reason, TypeObjectList *pretenureTypes)
 {
-    JS_AbortIfWrongThread(rt);
-
     if (rt->mainThread.suppressGC)
         return;
 
+    JS_AbortIfWrongThread(rt);
+
     if (!isEnabled())
         return;
 
     if (isEmpty())
         return;
 
     rt->gc.stats.count(gcstats::STAT_MINOR_GC);