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 239275 0962698c14a0458765a2774f16b7ae3abeb1bfb8
parent 239274 a39d8f6fc252d83379c019d5bdf44cb640584615
child 239276 58767ba4867e170256a7b50593ac04641d91a912
push id7472
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 20:36:27 +0000
treeherdermozilla-aurora@300ca104f8fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1113744
milestone37.0a1
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) {