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

Unified Diff: runtime/vm/longjump.cc

Issue 1686303002: Fix simulator with background compilation on. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/longjump.cc
diff --git a/runtime/vm/longjump.cc b/runtime/vm/longjump.cc
index ef141c9b220c07d42e43f43e75d20fa5d51d278f..13e01337c53829c2af4413991955162e9a4ffb5e 100644
--- a/runtime/vm/longjump.cc
+++ b/runtime/vm/longjump.cc
@@ -29,7 +29,10 @@ bool LongJumpScope::IsSafeToJump() {
uword jumpbuf_addr = Isolate::GetCurrentStackPointer();
#if defined(USING_SIMULATOR)
Simulator* sim = Simulator::Current();
- uword top_exit_frame_info = sim->top_exit_frame_info();
+ // When using simulator, only mutator thread should refer to Simulator
+ // since there can be only one per isolate.
+ uword top_exit_frame_info = thread->IsMutatorThread() ?
+ sim->top_exit_frame_info() : 0;
#else
uword top_exit_frame_info = thread->top_exit_frame_info();
#endif
« 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