Index: src/heap/array-buffer-tracker.cc |
diff --git a/src/heap/array-buffer-tracker.cc b/src/heap/array-buffer-tracker.cc |
index bbe3c6b93679324f90eaa037bbd6e8b71bde07cf..6e389c1cbf6abe216c782bae30fedcba5b283443 100644 |
--- a/src/heap/array-buffer-tracker.cc |
+++ b/src/heap/array-buffer-tracker.cc |
@@ -77,6 +77,7 @@ void ArrayBufferTracker::Unregister(JSArrayBuffer* buffer) { |
void ArrayBufferTracker::MarkLive(JSArrayBuffer* buffer) { |
+ base::LockGuard<base::Mutex> guard(&mutex_); |
void* data = buffer->backing_store(); |
// ArrayBuffer might be in the middle of being constructed. |
@@ -123,6 +124,8 @@ void ArrayBufferTracker::PrepareDiscoveryInNewSpace() { |
void ArrayBufferTracker::Promote(JSArrayBuffer* buffer) { |
+ base::LockGuard<base::Mutex> guard(&mutex_); |
+ |
if (buffer->is_external()) return; |
void* data = buffer->backing_store(); |
if (!data) return; |