Index: runtime/vm/thread.cc |
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
index 90dfaef6d0aa8a93e3d18a05537d1581e33ded52..ed0808823bd2df309fb374d500ec046a095670f3 100644 |
--- a/runtime/vm/thread.cc |
+++ b/runtime/vm/thread.cc |
@@ -359,9 +359,14 @@ void Thread::ClearReusableHandles() { |
} |
-void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
+void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor, |
+ bool validate_frames) { |
ASSERT(visitor != NULL); |
+ if (zone_ != NULL) { |
+ zone_->VisitObjectPointers(visitor); |
+ } |
+ |
// Visit objects in thread specific handles area. |
reusable_handles_.VisitObjectPointers(visitor); |
@@ -376,6 +381,15 @@ void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
scope->local_handles()->VisitObjectPointers(visitor); |
scope = scope->previous(); |
} |
+ |
+ // Iterate over all the stack frames and visit objects on the stack. |
+ StackFrameIterator frames_iterator(top_exit_frame_info(), |
+ validate_frames); |
+ StackFrame* frame = frames_iterator.NextFrame(); |
+ while (frame != NULL) { |
+ frame->VisitObjectPointers(visitor); |
+ frame = frames_iterator.NextFrame(); |
+ } |
} |