Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index 38a26be1e29a70450d6d08460fbe0e7473b25244..bd5aadb72265384515bf732be9adf39791767476 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -1201,6 +1201,10 @@ Object* Isolate::UnwindAndFindHandler() { |
| for (StackFrameIterator iter(this); !iter.done(); iter.Advance()) { |
| StackFrame* frame = iter.frame(); |
| + if (frame->is_wasm()) { |
| + trap_handler::ClearThreadInWasm(); |
|
Mark Seaborn
2017/02/17 21:41:12
The other calls are guarded by "if (trap_handler::
ahaas
2017/02/20 09:27:24
Is it intentional that ClearThreadInWasm is called
titzer
2017/02/20 09:50:08
+1 and make the method inline
Eric Holk
2017/02/23 02:16:55
Originally, it didn't really matter either way sin
Eric Holk
2017/02/23 02:16:55
Done.
Eric Holk
2017/02/23 02:16:56
Done.
|
| + } |
| + |
| // For JSEntryStub frames we always have a handler. |
| if (frame->is_entry() || frame->is_entry_construct()) { |
| StackHandler* handler = frame->top_handler(); |
| @@ -1232,6 +1236,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::ShouldEnableTrapHandler()) { |
| + trap_handler::SetThreadInWasm(); |
| + } |
| + |
| break; |
| } |
| } |