Bug 829617 - Make access to gTimestamp in HangMonitor atomic. r=froydnj

--HG--
extra : rebase_source : d40c8aee4dec4da601d451e29eb84c679ec60e9c
This commit is contained in:
Christian Holler 2013-10-29 00:29:00 +01:00
parent 62d2fd2c9d
commit 8fc5734b53

View File

@ -8,6 +8,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/Telemetry.h"
#include "mozilla/ProcessedStack.h"
#include "mozilla/Atomics.h"
#include "nsXULAppAPI.h"
#include "nsThreadUtils.h"
#include "nsStackWalk.h"
@ -55,7 +56,7 @@ bool gShutdown;
// The timestamp of the last event notification, or PR_INTERVAL_NO_WAIT if
// we're currently not processing events.
volatile PRIntervalTime gTimestamp = PR_INTERVAL_NO_WAIT;
Atomic<PRIntervalTime> gTimestamp(PR_INTERVAL_NO_WAIT);
#ifdef REPORT_CHROME_HANGS
// Main thread ID used in reporting chrome hangs under Windows