Commit 6d28125e authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Use UseTrapHandler enum consistently

Update two more uses of {bool} instead of {UseTrapHandler}.

R=mstarzinger@chromium.org

Change-Id: I83715661a2238004a4cbccf271a2bf781ef2f44d
Reviewed-on: https://chromium-review.googlesource.com/c/1293952
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56895}
parent 01e3a03d
......@@ -320,7 +320,9 @@ class WasmGraphBuilder {
const wasm::WasmModule* module() { return env_ ? env_->module : nullptr; }
bool use_trap_handler() const { return env_ && env_->use_trap_handler; }
wasm::UseTrapHandler use_trap_handler() const {
return env_ ? env_->use_trap_handler : wasm::kNoTrapHandler;
}
MachineGraph* mcgraph() { return mcgraph_; }
Graph* graph();
......
......@@ -781,7 +781,7 @@ uint32_t NativeModule::GetFunctionIndexFromJumpTableSlot(
void NativeModule::DisableTrapHandler() {
// Switch {use_trap_handler_} from true to false.
DCHECK(use_trap_handler_);
use_trap_handler_ = false;
use_trap_handler_ = kNoTrapHandler;
// Clear the code table (just to increase the chances to hit an error if we
// forget to re-add all code).
......
......@@ -320,7 +320,7 @@ class V8_EXPORT_PRIVATE NativeModule final {
uint32_t num_imported_functions() const {
return module_->num_imported_functions;
}
bool use_trap_handler() const { return use_trap_handler_; }
UseTrapHandler use_trap_handler() const { return use_trap_handler_; }
void set_lazy_compile_frozen(bool frozen) { lazy_compile_frozen_ = frozen; }
bool lazy_compile_frozen() const { return lazy_compile_frozen_; }
Vector<const byte> wire_bytes() const { return wire_bytes_.as_vector(); }
......@@ -453,7 +453,7 @@ class V8_EXPORT_PRIVATE NativeModule final {
std::atomic<size_t> committed_code_space_{0};
int modification_scope_depth_ = 0;
bool can_request_more_memory_;
bool use_trap_handler_ = false;
UseTrapHandler use_trap_handler_ = kNoTrapHandler;
bool is_executable_ = false;
bool lazy_compile_frozen_ = false;
......
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