Index: third_party/WebKit/Source/core/inspector/InstanceCounters.h |
diff --git a/third_party/WebKit/Source/core/inspector/InstanceCounters.h b/third_party/WebKit/Source/core/inspector/InstanceCounters.h |
index 691dd1c58a64b25e1874d23ed5a51226846480d6..e23e850852cc4a420e0d9f25e6eb0b21af9dcb59 100644 |
--- a/third_party/WebKit/Source/core/inspector/InstanceCounters.h |
+++ b/third_party/WebKit/Source/core/inspector/InstanceCounters.h |
@@ -33,6 +33,7 @@ |
#include "core/CoreExport.h" |
#include "wtf/Allocator.h" |
+#include "wtf/Atomics.h" |
#if ENABLE(ASSERT) |
#endif |
@@ -60,14 +61,12 @@ public: |
static inline void incrementCounter(CounterType type) |
{ |
- ASSERT(isMainThread()); |
- ++s_counters[type]; |
+ atomicIncrement(&s_counters[type]); |
} |
static inline void decrementCounter(CounterType type) |
{ |
- ASSERT(isMainThread()); |
- --s_counters[type]; |
+ atomicDecrement(&s_counters[type]); |
} |
CORE_EXPORT static int counterValue(CounterType); |