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

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

Issue 1115853004: Reland "Remove the weak list of array buffers" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ignore empty array buffers Created 5 years, 8 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 39803b1a2c98db9db392a6a0f360e3ba250c2dd0..6afee2602b28b7bde9cbd93dd71be5f248ae06a2 100644
--- a/src/heap/objects-visiting-inl.h
+++ b/src/heap/objects-visiting-inl.h
@@ -80,12 +80,9 @@ int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer(
Map* map, HeapObject* object) {
Heap* heap = map->GetHeap();
- VisitPointers(heap, HeapObject::RawField(
- object, JSArrayBuffer::BodyDescriptor::kStartOffset),
- HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset));
VisitPointers(
- heap, HeapObject::RawField(object,
- JSArrayBuffer::kWeakNextOffset + kPointerSize),
+ heap,
+ HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
return JSArrayBuffer::kSizeWithInternalFields;
}
@@ -533,11 +530,10 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer(
StaticVisitor::VisitPointers(
heap,
HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
- HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset));
- StaticVisitor::VisitPointers(
- heap, HeapObject::RawField(object,
- JSArrayBuffer::kWeakNextOffset + kPointerSize),
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
+ if (!JSArrayBuffer::cast(object)->is_external()) {
+ heap->RegisterLiveArrayBuffer(JSArrayBuffer::cast(object)->backing_store());
+ }
}
« src/heap/heap.cc ('K') | « src/heap/objects-visiting.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698