Commit b477a6d5 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm] Move ThreadInWasmScope out of trap-handler.h

{ThreadInWasmScope} in only used in a single location, which is in a
test. It does not look like many more such places will show up.

R=titzer@chromium.org,

Bug: v8:8015
Change-Id: I89f6f7e2bd13e2882e65f7657d73ba59a6c71757
Reviewed-on: https://chromium-review.googlesource.com/1193446
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55486}
parent f738bb24
......@@ -100,12 +100,6 @@ inline void ClearThreadInWasm() {
}
}
class ThreadInWasmScope {
public:
ThreadInWasmScope() { SetThreadInWasm(); }
~ThreadInWasmScope() { ClearThreadInWasm(); }
};
bool RegisterDefaultTrapHandler();
V8_EXPORT_PRIVATE void RestoreOriginalSignalHandler();
......
......@@ -461,10 +461,12 @@ class WasmRunner : public WasmRunnerBase {
wrapper_code, wrapper_.signature());
int32_t result;
{
trap_handler::ThreadInWasmScope scope;
trap_handler::SetThreadInWasm();
result = runner.Call(static_cast<void*>(&p)...,
static_cast<void*>(&return_value));
trap_handler::ClearThreadInWasm();
}
CHECK_EQ(WASM_WRAPPER_RETURN_VALUE, result);
return WasmRunnerBase::trap_happened
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment