diff options
Diffstat (limited to 'deps/v8/src/trap-handler/handler-outside.cc')
-rw-r--r-- | deps/v8/src/trap-handler/handler-outside.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/deps/v8/src/trap-handler/handler-outside.cc b/deps/v8/src/trap-handler/handler-outside.cc index 2d75d2d7e4..565289e18b 100644 --- a/deps/v8/src/trap-handler/handler-outside.cc +++ b/deps/v8/src/trap-handler/handler-outside.cc @@ -4,9 +4,9 @@ // PLEASE READ BEFORE CHANGING THIS FILE! // -// This file implements the support code for the out of bounds signal handler. -// Nothing in here actually runs in the signal handler, but the code here -// manipulates data structures used by the signal handler so we still need to be +// This file implements the support code for the out of bounds trap handler. +// Nothing in here actually runs in the trap handler, but the code here +// manipulates data structures used by the trap handler so we still need to be // careful. In order to minimize this risk, here are some rules to follow. // // 1. Avoid introducing new external dependencies. The files in src/trap-handler @@ -17,9 +17,8 @@ // // For more information, see https://goo.gl/yMeyUY. // -// For the code that runs in the signal handler itself, see handler-inside.cc. +// For the code that runs in the trap handler itself, see handler-inside.cc. -#include <signal.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> @@ -235,6 +234,8 @@ void ReleaseHandlerData(int index) { free(data); } +int* GetThreadInWasmThreadLocalAddress() { return &g_thread_in_wasm_code; } + size_t GetRecoveredTrapCount() { return gRecoveredTrapCount.load(std::memory_order_relaxed); } @@ -244,15 +245,17 @@ size_t GetRecoveredTrapCount() { // Otherwise, the correct one should be implemented in the appropriate // platform-specific handler-outside.cc. bool RegisterDefaultTrapHandler() { return false; } + +void RemoveTrapHandler() {} #endif bool g_is_trap_handler_enabled; -bool EnableTrapHandler(bool use_v8_signal_handler) { +bool EnableTrapHandler(bool use_v8_handler) { if (!V8_TRAP_HANDLER_SUPPORTED) { return false; } - if (use_v8_signal_handler) { + if (use_v8_handler) { g_is_trap_handler_enabled = RegisterDefaultTrapHandler(); return g_is_trap_handler_enabled; } |