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

Unified Diff: src/heap/objects-visiting-inl.h

Issue 1133773002: Keep track of array buffers in new space separately (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 7 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
Index: src/heap/objects-visiting-inl.h
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h
index 6afee2602b28b7bde9cbd93dd71be5f248ae06a2..62be04ff349afcc97ba7fbbea4282d59703bb002 100644
--- a/src/heap/objects-visiting-inl.h
+++ b/src/heap/objects-visiting-inl.h
@@ -84,6 +84,10 @@ int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer(
heap,
HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
+ if (!JSArrayBuffer::cast(object)->is_external()) {
+ heap->RegisterLiveArrayBuffer(true,
+ JSArrayBuffer::cast(object)->backing_store());
+ }
return JSArrayBuffer::kSizeWithInternalFields;
}
@@ -532,7 +536,8 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer(
HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
if (!JSArrayBuffer::cast(object)->is_external()) {
- heap->RegisterLiveArrayBuffer(JSArrayBuffer::cast(object)->backing_store());
+ heap->RegisterLiveArrayBuffer(heap->InNewSpace(object),
+ JSArrayBuffer::cast(object)->backing_store());
}
}
« src/heap/mark-compact.cc ('K') | « src/heap/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698