Bug 1532366 - Don't record changes to ScriptSource atomic counter, r=loganfsmyth.
authorBrian Hackett <bhackett1024@gmail.com>
Wed, 06 Mar 2019 19:59:34 +0000
changeset 520590 01a347dc3993e9b0b06fa7d138d4b89e9039d950
parent 520589 873b90887e3af682383dea7a7e1fb52d6ec02960
child 520591 4a50be47adebd4c8f4fd2fb0171aa0c40d611921
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1532366
milestone67.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 1532366 - Don't record changes to ScriptSource atomic counter, r=loganfsmyth. Differential Revision: https://phabricator.services.mozilla.com/D22309
js/src/vm/JSScript.cpp
js/src/vm/JSScript.h
--- a/js/src/vm/JSScript.cpp
+++ b/js/src/vm/JSScript.cpp
@@ -2845,17 +2845,19 @@ bool ScriptSource::setSourceMapURL(JSCon
   if (len == 1) {
     return true;
   }
 
   sourceMapURL_ = DuplicateString(cx, sourceMapURL);
   return sourceMapURL_ != nullptr;
 }
 
-/* static */ mozilla::Atomic<uint32_t> ScriptSource::idCount_;
+/* static */ mozilla::Atomic<uint32_t, mozilla::SequentiallyConsistent,
+                             mozilla::recordreplay::Behavior::DontPreserve>
+    ScriptSource::idCount_;
 
 /*
  * [SMDOC] JSScript data layout (shared)
  *
  * Shared script data management.
  *
  * SharedScriptData::data contains data that can be shared within a
  * runtime. The atoms() data is placed first to simplify its alignment.
--- a/js/src/vm/JSScript.h
+++ b/js/src/vm/JSScript.h
@@ -614,17 +614,19 @@ class ScriptSource {
   // to refer to this source from places that don't want to hold a strong
   // reference on the source itself.
   //
   // This is a 32 bit ID and could overflow, in which case the ID will not be
   // unique anymore.
   uint32_t id_;
 
   // How many ids have been handed out to sources.
-  static mozilla::Atomic<uint32_t> idCount_;
+  static mozilla::Atomic<uint32_t, mozilla::SequentiallyConsistent,
+                         mozilla::recordreplay::Behavior::DontPreserve>
+      idCount_;
 
   // True if we can call JSRuntime::sourceHook to load the source on
   // demand. If sourceRetrievable_ and hasSourceText() are false, it is not
   // possible to get source at all.
   bool sourceRetrievable_ : 1;
   bool hasIntroductionOffset_ : 1;
   bool containsAsmJS_ : 1;