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

Unified Diff: src/global-handles.cc

Issue 355041: Made iteration of global handles more efficient on scavenges. (Closed)
Patch Set: Created 11 years, 1 month 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/global-handles.h ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index a57c8b0c278dc472311d8e143ccb84d1534bc8b7..57821d461c1d6ea95d1f7fc5f8b5c8e66840bc10 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -390,7 +390,7 @@ void GlobalHandles::PostGarbageCollectionProcessing() {
}
-void GlobalHandles::IterateRoots(ObjectVisitor* v) {
+void GlobalHandles::IterateStrongRoots(ObjectVisitor* v) {
// Traversal of global handles marked as NORMAL or NEAR_DEATH.
Mads Ager (chromium) 2009/11/05 15:06:19 This comment looks wrong. We are only interating
Christian Plesner Hansen 2009/11/05 15:11:03 Fixed
for (Node* current = head_; current != NULL; current = current->next()) {
if (current->state_ == Node::NORMAL) {
@@ -400,6 +400,15 @@ void GlobalHandles::IterateRoots(ObjectVisitor* v) {
}
+void GlobalHandles::IterateAllRoots(ObjectVisitor* v) {
+ for (Node* current = head_; current != NULL; current = current->next()) {
+ if (current->state_ != Node::DESTROYED) {
+ v->VisitPointer(&current->object_);
+ }
+ }
+}
+
+
void GlobalHandles::TearDown() {
// Reset all the lists.
set_head(NULL);
« no previous file with comments | « src/global-handles.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698