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

Unified Diff: src/mark-compact.cc

Issue 13341: Improve mark-compact object grouping interface. (Closed)
Patch Set: Tests. Created 12 years 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.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index de05339a77f4cef1ef50978b886fd58b95ae7c54..ede5741ae8192aeb85863eb8cfc1d6ea9c81b2af 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -564,10 +564,10 @@ void MarkCompactCollector::ProcessRoots(RootMarkingVisitor* visitor) {
void MarkCompactCollector::MarkObjectGroups() {
- List<ObjectGroup*>& object_groups = GlobalHandles::ObjectGroups();
+ List<ObjectGroup*>* object_groups = GlobalHandles::ObjectGroups();
- for (int i = 0; i < object_groups.length(); i++) {
- ObjectGroup* entry = object_groups[i];
+ for (int i = 0; i < object_groups->length(); i++) {
+ ObjectGroup* entry = object_groups->at(i);
if (entry == NULL) continue;
List<Object**>& objects = entry->objects_;
@@ -591,8 +591,8 @@ void MarkCompactCollector::MarkObjectGroups() {
}
// Once the entire group has been colored gray, set the object group
// to NULL so it won't be processed again.
- delete object_groups[i];
- object_groups[i] = NULL;
+ delete object_groups->at(i);
+ object_groups->at(i) = NULL;
}
}
« no previous file with comments | « src/global-handles.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698