Chromium Code Reviews| Index: src/global-handles.cc |
| diff --git a/src/global-handles.cc b/src/global-handles.cc |
| index 650999f394c5cc7c2e5397afff53c74e3c186d20..0784c8f2c01a5aa7add080e6cf9fddc71d86d788 100644 |
| --- a/src/global-handles.cc |
| +++ b/src/global-handles.cc |
| @@ -687,6 +687,19 @@ void GlobalHandles::IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v) { |
| } |
| +void GlobalHandles::IterateNewSpaceWeakRoots(ObjectVisitor* v, |
| + WeakSlotCallback can_skip) { |
| + for (int i = 0; i < new_space_nodes_.length(); ++i) { |
| + Node* node = new_space_nodes_[i]; |
| + Object* object = node->object(); |
| + // If node->location is used instead of &object, import-expando-gc.html |
| + // fails |
| + if (node->IsWeak() && !can_skip(node->location())) |
| + v->VisitPointer(&object); // node->location()); |
| + } |
| +} |
| + |
| + |
| bool GlobalHandles::IterateObjectGroups(ObjectVisitor* v, |
| WeakSlotCallbackWithHeap can_skip) { |
| ComputeObjectGroupsAndImplicitReferences(); |
| @@ -718,7 +731,8 @@ bool GlobalHandles::IterateObjectGroups(ObjectVisitor* v, |
| for (size_t j = 0; j < entry->length; ++j) { |
| Object* object = *objects[j]; |
| if (object->IsHeapObject()) { |
| - v->VisitPointer(&object); |
| + // v->VisitPointer(&object); |
| + v->VisitPointer(objects[j]); |
|
mythria
2015/09/22 10:57:00
If I pass objects[j] instead of &object for the vi
|
| any_group_was_visited = true; |
| } |
| } |