Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1556)

Unified Diff: Source/platform/heap/Visitor.h

Issue 851723002: Oilpan: avoid data race on gcInfo index initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/heap/Visitor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Visitor.h
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h
index c20522251b88795d2a001314e81d1b0bedd93483..d000afcb73de51916524129c0cf529201cb7a355 100644
--- a/Source/platform/heap/Visitor.h
+++ b/Source/platform/heap/Visitor.h
@@ -34,6 +34,7 @@
#include "platform/PlatformExport.h"
#include "platform/heap/ThreadState.h"
#include "wtf/Assertions.h"
+#include "wtf/Atomics.h"
#include "wtf/Deque.h"
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
@@ -881,7 +882,7 @@ private:
#define RETURN_GCINFO_INDEX() \
static size_t gcInfoIndex = 0; \
ASSERT(s_gcInfoTable); \
- if (!gcInfoIndex) \
+ if (!acquireLoad(&gcInfoIndex)) \
GCInfoTable::ensureGCInfoIndex(&gcInfo, &gcInfoIndex); \
ASSERT(gcInfoIndex >= 1); \
ASSERT(gcInfoIndex < GCInfoTable::maxIndex); \
« no previous file with comments | « no previous file | Source/platform/heap/Visitor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698