| 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();
|
| + }
|
| +
|
| // 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;
|
| }
|
| }
|
|
|