Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: src/isolate.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Split signal handler into a separate file Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 36b3b34e6ff9a0ca5fd56b775d81ed661e73f804..732ec459f2527a858c6a93f86ed77ced567ff436 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()) {
+ 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;
}
}

Powered by Google App Engine
This is Rietveld 408576698