Bug 1113744 - Don't call zone() when compacting off thread on a CLOSED TREE.
authorBrian Hackett <bhackett1024@gmail.com>
Wed, 07 Jan 2015 13:01:27 -0700
changeset 248363 0962698c14a0458765a2774f16b7ae3abeb1bfb8
parent 248362 a39d8f6fc252d83379c019d5bdf44cb640584615
child 248364 58767ba4867e170256a7b50593ac04641d91a912
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1113744
milestone37.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 1113744 - Don't call zone() when compacting off thread on a CLOSED TREE.
js/src/jsinfer.cpp
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -4648,17 +4648,19 @@ TypeObject::clearProperties()
     setBasePropertyCount(0);
     propertySet = nullptr;
 }
 
 #ifdef DEBUG
 bool
 TypeObject::needsSweep()
 {
-    return generation() != zone()->types.generation;
+    // Note: this can be called off thread during compacting GCs, in which case
+    // nothing will be running on the main thread.
+    return generation() != zoneFromAnyThread()->types.generation;
 }
 #endif
 
 static void
 EnsureHasAutoClearTypeInferenceStateOnOOM(AutoClearTypeInferenceStateOnOOM *&oom, Zone *zone,
                                           Maybe<AutoClearTypeInferenceStateOnOOM> &fallback)
 {
     if (!oom) {