Bug 1110931 - Make heapState an Atomic; r=jonco
authorTerrence Cole <terrence@mozilla.com>
Thu, 18 Dec 2014 10:16:58 -0800
changeset 221788 db6bdc09068d653d17c358bf8cd402e8f5032c28
parent 221787 f1c8fc215969fb219cb332cafa29f3ade591eecf
child 221789 65adc56e14a900173c21bb52ebc43d87e2743eaa
push id10627
push userphilringnalda@gmail.com
push dateThu, 01 Jan 2015 22:22:45 +0000
treeherderfx-team@13fe5ad0364d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1110931
milestone37.0a1
Bug 1110931 - Make heapState an Atomic; r=jonco
js/src/gc/GCRuntime.h
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -831,17 +831,17 @@ class GCRuntime
      * stuff. At various times we check this counter and, if it has changed, we
      * run an immediate, non-incremental GC to clean up the dead
      * zones. This should happen very rarely.
      */
     unsigned objectsMarkedInDeadZones;
 
     bool poked;
 
-    volatile js::HeapState heapState;
+    mozilla::Atomic<js::HeapState> heapState;
 
     /*
      * ForkJoin workers enter and leave GC independently; this counter
      * tracks the number that are currently in GC.
      *
      * Technically this should be #ifdef JSGC_FJGENERATIONAL but that
      * affects the observed size of JSRuntime in problematic ways, see
      * note in vm/ThreadPool.h.