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

Unified Diff: runtime/vm/thread.cc

Issue 1814853005: Restructure/fix thread pointer visiting; added some asserts. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/thread_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+ }
}
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/thread_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698