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

Unified Diff: src/runtime/runtime-wasm.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Restore signal mask at the right place Created 3 years, 10 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
Index: src/runtime/runtime-wasm.cc
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc
index 3ed63879add0dd24a128c273ff0075f92070f276..bad5fc35b4123958eebac28be6c8315a62879f76 100644
--- a/src/runtime/runtime-wasm.cc
+++ b/src/runtime/runtime-wasm.cc
@@ -12,6 +12,7 @@
#include "src/factory.h"
#include "src/frames-inl.h"
#include "src/objects-inl.h"
+#include "src/trap-handler/trap-handler.h"
#include "src/v8memory.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects.h"
@@ -160,6 +161,18 @@ RUNTIME_FUNCTION(Runtime_WasmGetCaughtExceptionValue) {
return exception;
}
+RUNTIME_FUNCTION(Runtime_SetThreadInWasm) {
+ DCHECK(!trap_handler::IsThreadInWasm());
+ trap_handler::SetThreadInWasm();
+ return isolate->heap()->undefined_value();
+}
+
+RUNTIME_FUNCTION(Runtime_ClearThreadInWasm) {
+ DCHECK(trap_handler::IsThreadInWasm());
+ trap_handler::ClearThreadInWasm();
+ return isolate->heap()->undefined_value();
+}
+
RUNTIME_FUNCTION(Runtime_WasmRunInterpreter) {
DCHECK(args.length() == 3);
HandleScope scope(isolate);

Powered by Google App Engine
This is Rietveld 408576698