Index: src/runtime/runtime-wasm.cc |
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc |
index d7e1dba54f7f18f10946e1397c49e064d707c1c0..fb3716828ca67496a762542571e7d5a063fc371c 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" |
@@ -152,6 +153,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); |