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

Unified Diff: runtime/vm/isolate.cc

Issue 1769183003: Fix sticky error propagation from thread to isolate (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Allow only mutator thread to propagate sticky error 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 4b1124785de7ad9019f6e452420de901fca1c876..50caaffe0f82bb9e0419508450f5abb4eae9ca40 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -2592,6 +2592,9 @@ void Isolate::UnscheduleThread(Thread* thread,
// so we create a MonitorLocker object which does not do any
// no_safepoint_scope_depth increments/decrements.
MonitorLocker ml(threads_lock(), false);
+ if (is_mutator) {
+ thread->isolate()->object_store()->SetStickyErrorFromThread(thread);
+ }
siva 2016/03/09 07:07:51 Could you add a comment here
if (!bypass_safepoint) {
// Ensure that the thread reports itself as being at a safepoint.
thread->EnterSafepoint();
@@ -2610,6 +2613,7 @@ void Isolate::UnscheduleThread(Thread* thread,
thread->set_execution_state(Thread::kThreadInVM);
thread->set_safepoint_state(0);
thread->clear_pending_functions();
+ thread->clear_sticky_error();
ASSERT(thread->no_safepoint_scope_depth() == 0);
// Return thread structure.
thread_registry()->ReturnThreadLocked(is_mutator, thread);

Powered by Google App Engine
This is Rietveld 408576698