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

Unified Diff: runtime/vm/isolate.cc

Issue 2215523002: Fix for issue 27019 (Safepoint assertion failure in Flutter) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 32dc9677e6750c4dd446149ef5fa79ae41f1b008..52aaa445d990c77a11dcf1a2ea3f634f4c007c36 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -2595,7 +2595,8 @@ Thread* Isolate::ScheduleThread(bool is_mutator, bool bypass_safepoint) {
ASSERT(heap() != NULL);
thread->heap_ = heap();
thread->set_os_thread(os_thread);
- ASSERT(thread->execution_state() == Thread::kThreadInVM);
+ ASSERT(thread->execution_state() == Thread::kThreadInNative);
+ thread->set_execution_state(Thread::kThreadInVM);
thread->set_safepoint_state(0);
thread->set_vm_tag(VMTag::kVMTagId);
ASSERT(thread->no_safepoint_scope_depth() == 0);
@@ -2646,8 +2647,8 @@ void Isolate::UnscheduleThread(Thread* thread,
thread->isolate_ = NULL;
thread->heap_ = NULL;
thread->set_os_thread(NULL);
- thread->set_execution_state(Thread::kThreadInVM);
- thread->set_safepoint_state(0);
+ thread->set_execution_state(Thread::kThreadInNative);
+ thread->set_safepoint_state(Thread::SetAtSafepoint(true, 0));
thread->clear_pending_functions();
ASSERT(thread->no_safepoint_scope_depth() == 0);
// Return thread structure.
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698