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

Unified Diff: src/isolate.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Make sure guard pages get set up when resizing from 0 to more than 0 Created 3 years, 9 months 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
« no previous file with comments | « src/factory.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index de330d138655940d3d382b61f538d2770ae1d902..52c313b5b582b208c252134b2eb33c9953de0988 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,11 @@ 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.
+ trap_handler::SetThreadInWasm();
+
break;
}
}
« no previous file with comments | « src/factory.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698