| Index: runtime/vm/longjump.cc
|
| diff --git a/runtime/vm/longjump.cc b/runtime/vm/longjump.cc
|
| index 563c64ba7edf539c0836215d2fa608ccc089730d..0e53b600ddfe21860fd8551db4d83c4f056107d4 100644
|
| --- a/runtime/vm/longjump.cc
|
| +++ b/runtime/vm/longjump.cc
|
| @@ -26,14 +26,18 @@ bool LongJumpScope::IsSafeToJump() {
|
| // We do not want to jump past Dart frames. Note that this code
|
| // assumes the stack grows from high to low.
|
| Thread* thread = Thread::Current();
|
| + Isolate* isolate = thread->isolate();
|
| uword jumpbuf_addr = Isolate::GetCurrentStackPointer();
|
| #if defined(USING_SIMULATOR)
|
| - Isolate* isolate = thread->isolate();
|
| - ASSERT(isolate->MutatorThreadIsCurrentThread());
|
| uword top_exit_frame_info = isolate->simulator()->top_exit_frame_info();
|
| #else
|
| uword top_exit_frame_info = thread->top_exit_frame_info();
|
| #endif
|
| + if (!isolate->MutatorThreadIsCurrentThread()) {
|
| + // A helper thread does not execute Dart code, so it's safe to jump.
|
| + ASSERT(top_exit_frame_info == 0);
|
| + return true;
|
| + }
|
| return ((top_exit_frame_info == 0) || (jumpbuf_addr < top_exit_frame_info));
|
| }
|
|
|
|
|