Commit 09369c5e authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Set and reset the ThreadInWasm flag in interpreter entry

The wasm interpreter entry is only called from wasm code. Hence the
flag is cleared unconditinally before executing in the interpreter.
Note that the interpreter does not use trap handling. It can on the
other hand call to JS functions, hence the flag should not be set while
executing in the interpreter.
The flag is reset when returning from the interpreter.

This CL avoids test failures in follow-up CLs which emerged after
rebasing on the trap handler CL of eholk.

R=titzer@chromium.org, ahaas@chromium.org
CC=eholk@chromium.org
BUG=v8:5822, v8:5277

Change-Id: I8106e3a92bd9fd6159c785a718bed2d23cb3d593
Reviewed-on: https://chromium-review.googlesource.com/454676
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43801}
parent e08289d0
......@@ -200,7 +200,10 @@ RUNTIME_FUNCTION(Runtime_WasmRunInterpreter) {
DCHECK_NULL(isolate->context());
isolate->set_context(instance->compiled_module()->ptr_to_native_context());
trap_handler::ClearThreadInWasm();
instance->debug_info()->RunInterpreter(func_index, arg_buffer);
trap_handler::SetThreadInWasm();
return isolate->heap()->undefined_value();
}
......
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