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

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 1199913002: Keep track of ArrayBuffers based on collector type, not space (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_VISITING_INL_H_ 5 #ifndef V8_OBJECTS_VISITING_INL_H_
6 #define V8_OBJECTS_VISITING_INL_H_ 6 #define V8_OBJECTS_VISITING_INL_H_
7 7
8 #include "src/heap/objects-visiting.h" 8 #include "src/heap/objects-visiting.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 template <typename StaticVisitor> 501 template <typename StaticVisitor>
502 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( 502 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer(
503 Map* map, HeapObject* object) { 503 Map* map, HeapObject* object) {
504 Heap* heap = map->GetHeap(); 504 Heap* heap = map->GetHeap();
505 505
506 StaticVisitor::VisitPointers( 506 StaticVisitor::VisitPointers(
507 heap, 507 heap,
508 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), 508 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
509 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); 509 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
510 if (!JSArrayBuffer::cast(object)->is_external()) { 510 if (!JSArrayBuffer::cast(object)->is_external()) {
511 heap->RegisterLiveArrayBuffer(heap->InNewSpace(object), 511 heap->RegisterLiveArrayBuffer(false,
512 JSArrayBuffer::cast(object)->backing_store()); 512 JSArrayBuffer::cast(object)->backing_store());
513 } 513 }
514 } 514 }
515 515
516 516
517 template <typename StaticVisitor> 517 template <typename StaticVisitor>
518 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray( 518 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray(
519 Map* map, HeapObject* object) { 519 Map* map, HeapObject* object) {
520 StaticVisitor::VisitPointers( 520 StaticVisitor::VisitPointers(
521 map->GetHeap(), 521 map->GetHeap(),
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 836
837 RelocIterator it(this, mode_mask); 837 RelocIterator it(this, mode_mask);
838 for (; !it.done(); it.next()) { 838 for (; !it.done(); it.next()) {
839 it.rinfo()->template Visit<StaticVisitor>(heap); 839 it.rinfo()->template Visit<StaticVisitor>(heap);
840 } 840 }
841 } 841 }
842 } 842 }
843 } // namespace v8::internal 843 } // namespace v8::internal
844 844
845 #endif // V8_OBJECTS_VISITING_INL_H_ 845 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698