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

Unified Diff: runtime/vm/thread.cc

Issue 1275853008: Reverts VM thread cleanup (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/service_isolate.cc ('k') | runtime/vm/thread_pool.h » ('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 9345b645a8644effe83be23ea6f75bb05bd72b0b..3b3eb3308d30b292147168449f670ba1f62033f5 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -134,8 +134,11 @@ void Thread::EnterIsolate(Isolate* isolate) {
ASSERT(thread->thread_state() == NULL);
InterruptableThreadState* thread_state =
ThreadInterrupter::GetCurrentThreadState();
- // TODO(koda): Calling Isolate::CheckForDuplicateThreadState(thread_state)
- // here can lead to deadlock. Evaluate doing this check some other way.
+#if defined(DEBUG)
+ thread->set_thread_state(NULL); // Exclude thread itself from the dupe check.
+ Isolate::CheckForDuplicateThreadState(thread_state);
+ thread->set_thread_state(thread_state);
+#endif
ASSERT(thread_state != NULL);
// TODO(koda): Migrate profiler interface to use Thread.
Profiler::BeginExecution(isolate);
« no previous file with comments | « runtime/vm/service_isolate.cc ('k') | runtime/vm/thread_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698