From 413abd40b57a8262fbd2f1cb3170f6960fb70383 Mon Sep 17 00:00:00 2001
From: Brian Hackett <bhackett1024@gmail.com>
Date: Sat, 21 Jul 2018 14:31:21 +0000
Subject: [PATCH] Bug 1465452 Part 6 - Don't record assertion crashing flag,
 r=froydnj.

--HG--
extra : rebase_source : 994a8c6c16e20b81e2e112ef15fc08190678c440
---
 mfbt/Assertions.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mfbt/Assertions.cpp b/mfbt/Assertions.cpp
index 2021d13fd9ca8..0db03f42af66a 100644
--- a/mfbt/Assertions.cpp
+++ b/mfbt/Assertions.cpp
@@ -34,7 +34,12 @@ MOZ_CrashOOL(const char* aFilename, int aLine, const char* aReason)
 }
 
 static char sPrintfCrashReason[sPrintfCrashReasonSize] = {};
-static mozilla::Atomic<bool> sCrashing(false);
+
+// Accesses to this atomic are not included in web replay recordings, so that
+// if we crash in an area where recorded events are not allowed the true reason
+// for the crash is not obscured by a record/replay error.
+static mozilla::Atomic<bool, mozilla::SequentiallyConsistent,
+                       mozilla::recordreplay::Behavior::DontPreserve> sCrashing(false);
 
 #ifndef DEBUG
 MFBT_API MOZ_COLD MOZ_NORETURN MOZ_NEVER_INLINE MOZ_FORMAT_PRINTF(2, 3) void
-- 
GitLab