Bug 1110931 - Make heapState an Atomic; r=jonco
authorTerrence Cole <terrence@mozilla.com>
Thu, 18 Dec 2014 10:16:58 -0800
changeset 247612 db6bdc09068d653d17c358bf8cd402e8f5032c28
parent 247611 f1c8fc215969fb219cb332cafa29f3ade591eecf
child 247613 65adc56e14a900173c21bb52ebc43d87e2743eaa
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)
reviewersjonco
bugs1110931
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 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.