Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index bac61301c6a465bab8257b91e2c1dbbebd84471f..10e845a49940457760689e57c5db370c1d611a84 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -1202,6 +1202,10 @@ Object* Isolate::UnwindAndFindHandler() { |
| for (StackFrameIterator iter(this); !iter.done(); iter.Advance()) { |
| StackFrame* frame = iter.frame(); |
| + if (frame->is_wasm() && trap_handler::IsThreadInWasm()) { |
| + trap_handler::ClearThreadInWasm(); |
| + } |
| + |
| // For JSEntryStub frames we always have a handler. |
| if (frame->is_entry() || frame->is_entry_construct()) { |
| StackHandler* handler = frame->top_handler(); |
| @@ -1233,6 +1237,13 @@ Object* Isolate::UnwindAndFindHandler() { |
| handler_sp = return_sp; |
| handler_fp = frame->fp(); |
| + |
| + // This is going to be handled by Wasm, so we need to set the TLS flag |
| + // again. |
| + if (trap_handler::UseTrapHandler()) { |
|
titzer
2017/03/01 16:48:47
Any harm in moving the if inside the SetThreadInWa
Eric Holk
2017/03/01 17:26:13
Nope, in fact it's already there. I'll remove it h
|
| + trap_handler::SetThreadInWasm(); |
| + } |
| + |
| break; |
| } |
| } |