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

Unified Diff: runtime/vm/thread_registry.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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_registry.cc
diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
index 6b340733e789723ff76f3004d84ccf4e639d8935..c660843c1eac3bd892de539293114b2dae1632c6 100644
--- a/runtime/vm/thread_registry.cc
+++ b/runtime/vm/thread_registry.cc
@@ -56,7 +56,6 @@ void ThreadRegistry::ReturnThreadLocked(bool is_mutator, Thread* thread) {
// Remove thread from the active list for the isolate.
RemoveFromActiveListLocked(thread);
if (!is_mutator) {
- ASSERT(thread->api_top_scope() == NULL);
ReturnToFreelistLocked(thread);
}
}
@@ -68,27 +67,16 @@ void ThreadRegistry::VisitObjectPointers(ObjectPointerVisitor* visitor,
bool mutator_thread_visited = false;
Thread* thread = active_list_;
while (thread != NULL) {
- if (thread->zone() != NULL) {
- thread->zone()->VisitObjectPointers(visitor);
- }
- thread->VisitObjectPointers(visitor);
+ thread->VisitObjectPointers(visitor, validate_frames);
if (mutator_thread_ == thread) {
mutator_thread_visited = true;
}
- // Iterate over all the stack frames and visit objects on the stack.
- StackFrameIterator frames_iterator(thread->top_exit_frame_info(),
- validate_frames);
- StackFrame* frame = frames_iterator.NextFrame();
- while (frame != NULL) {
- frame->VisitObjectPointers(visitor);
- frame = frames_iterator.NextFrame();
- }
thread = thread->next_;
}
// Visit mutator thread even if it is not in the active list because of
// api handles.
if (!mutator_thread_visited && (mutator_thread_ != NULL)) {
- mutator_thread_->VisitObjectPointers(visitor);
+ mutator_thread_->VisitObjectPointers(visitor, validate_frames);
}
}
« no previous file with comments | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698