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

Side by Side Diff: src/global-handles.cc

Issue 1815153002: Introduce EmbedderHeapTracer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Incorporate Jochen's wonderful comments Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 #include "src/global-handles.h" 5 #include "src/global-handles.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/v8.h" 8 #include "src/v8.h"
9 #include "src/vm-state-inl.h" 9 #include "src/vm-state-inl.h"
10 10
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 637
638 bool GlobalHandles::IsNearDeath(Object** location) { 638 bool GlobalHandles::IsNearDeath(Object** location) {
639 return Node::FromLocation(location)->IsNearDeath(); 639 return Node::FromLocation(location)->IsNearDeath();
640 } 640 }
641 641
642 642
643 bool GlobalHandles::IsWeak(Object** location) { 643 bool GlobalHandles::IsWeak(Object** location) {
644 return Node::FromLocation(location)->IsWeak(); 644 return Node::FromLocation(location)->IsWeak();
645 } 645 }
646 646
647 void GlobalHandles::AddObjectToMarkingDeque(Object** object, Isolate* isolate) {
648 isolate->heap()->AddObjectToMarkingDeque(object);
649 }
647 650
648 void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) { 651 void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) {
649 for (NodeIterator it(this); !it.done(); it.Advance()) { 652 for (NodeIterator it(this); !it.done(); it.Advance()) {
650 Node* node = it.node(); 653 Node* node = it.node();
651 if (node->IsWeakRetainer()) { 654 if (node->IsWeakRetainer()) {
652 // Pending weak phantom handles die immediately. Everything else survives. 655 // Pending weak phantom handles die immediately. Everything else survives.
653 if (node->state() == Node::PENDING && 656 if (node->state() == Node::PENDING &&
654 node->weakness_type() != NORMAL_WEAK) { 657 node->weakness_type() != NORMAL_WEAK) {
655 node->CollectPhantomCallbackData(isolate(), 658 node->CollectPhantomCallbackData(isolate(),
656 &pending_phantom_callbacks_); 659 &pending_phantom_callbacks_);
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 blocks_[block][offset] = object; 1486 blocks_[block][offset] = object;
1484 if (isolate->heap()->InNewSpace(object)) { 1487 if (isolate->heap()->InNewSpace(object)) {
1485 new_space_indices_.Add(size_); 1488 new_space_indices_.Add(size_);
1486 } 1489 }
1487 *index = size_++; 1490 *index = size_++;
1488 } 1491 }
1489 1492
1490 1493
1491 } // namespace internal 1494 } // namespace internal
1492 } // namespace v8 1495 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698