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

Unified Diff: runtime/vm/thread_registry.cc

Issue 1491283002: VM: Fix crash in profile signal handler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | 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 264b844f453d716f9a4653a07b4807ae44baad2d..0d36e0d2575cac44dc1d0474baf0cbe140db0bc8 100644
--- a/runtime/vm/thread_registry.cc
+++ b/runtime/vm/thread_registry.cc
@@ -106,11 +106,11 @@ void ThreadRegistry::Unschedule(Thread* thread,
OSThread* os_thread = thread->os_thread();
ASSERT(os_thread != NULL);
os_thread->DisableThreadInterrupts();
+ os_thread->set_thread(NULL);
+ OSThread::SetCurrent(os_thread);
thread->isolate_ = NULL;
thread->heap_ = NULL;
thread->set_os_thread(NULL);
- os_thread->set_thread(NULL);
- OSThread::SetCurrent(os_thread);
if (!is_mutator) {
ASSERT(thread->api_top_scope() == NULL);
ReturnThreadToFreelist(thread);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698