Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index 4e5a7c8fd983d2dfb3c710024ff32c5b63e34baf..40ae9d8ff8e114fbc5beb94c8e7d7ef41b1bbec4 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -1203,6 +1203,10 @@ Object* Isolate::UnwindAndFindHandler() { |
| for (StackFrameIterator iter(this); !iter.done(); iter.Advance()) { |
| StackFrame* frame = iter.frame(); |
| + if (frame->is_wasm() && trap_handler::EnableTrapHandler()) { |
|
titzer
2017/01/09 09:26:56
I think this logic is correct, but maybe it would
Eric Holk
2017/01/10 23:10:48
Was the concern about the extra call to EnableTrap
|
| + trap_handler::ClearThreadInWasm(); |
| + } |
| + |
| // For JSEntryStub frames we always have a handler. |
| if (frame->is_entry() || frame->is_entry_construct()) { |
| StackHandler* handler = frame->top_handler(); |
| @@ -1234,6 +1238,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::EnableTrapHandler()) { |
| + trap_handler::SetThreadInWasm(); |
| + } |
| + |
| break; |
| } |
| } |