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

Unified Diff: src/heap/array-buffer-tracker.cc

Issue 1640563004: Reland of "[heap] Parallel newspace evacuation, semispace copy, and compaction \o/" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Convert bogus DCHECK into proper branch Created 4 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 | « src/heap/array-buffer-tracker.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/heap/array-buffer-tracker.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698