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

Unified Diff: runtime/vm/thread.cc

Issue 1806093002: Clear reusable handles of helper threads as well. Visit mutator_thread_ even if it is not active (a… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | « no previous file | 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 c5c6e70a7bb8524c897de04779dcfa75b19f837f..90dfaef6d0aa8a93e3d18a05537d1581e33ded52 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -262,6 +262,8 @@ void Thread::ExitIsolateAsHelper(bool bypass_safepoint) {
ASSERT(thread != NULL);
ASSERT(!thread->IsMutatorThread());
ASSERT(thread->execution_state() == Thread::kThreadInVM);
+ // Clear since GC will not visit the thread once it is unscheduled.
+ thread->ClearReusableHandles();
thread->StoreBufferRelease();
Isolate* isolate = thread->isolate();
ASSERT(isolate != NULL);
« no previous file with comments | « no previous file | runtime/vm/thread_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698