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); \ |