Commit 8619422e authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm][test] Remove an unneeded pointer

We were storing the pointer to the WasmModule both as a shared_ptr and
as a raw pointer. Maybe this had historical reasons, but now it's just
redundant.

R=thibaudm@chromium.org

Change-Id: Id72d102b6df804f93e3ab0235eeceef91a6dd8fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593334Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71782}
parent 1f7e126f
......@@ -23,7 +23,6 @@ TestingModuleBuilder::TestingModuleBuilder(
TestExecutionTier tier, RuntimeExceptionSupport exception_support,
LowerSimd lower_simd)
: test_module_(std::make_shared<WasmModule>()),
test_module_ptr_(test_module_.get()),
isolate_(CcTest::InitIsolateOnce()),
enabled_features_(WasmFeatures::FromIsolate(isolate_)),
execution_tier_(tier),
......@@ -73,7 +72,7 @@ TestingModuleBuilder::TestingModuleBuilder(
if (tier == TestExecutionTier::kInterpreter) {
interpreter_ = std::make_unique<WasmInterpreter>(
isolate_, test_module_ptr_,
isolate_, test_module_.get(),
ModuleWireBytes{native_module_->wire_bytes()}, instance_object_);
}
}
......@@ -312,7 +311,7 @@ CompilationEnv TestingModuleBuilder::CreateCompilationEnv() {
// trap_handler::IsTrapHandlerEnabled().
const bool is_trap_handler_enabled =
V8_TRAP_HANDLER_SUPPORTED && i::FLAG_wasm_trap_handler;
return {test_module_ptr_,
return {test_module_.get(),
is_trap_handler_enabled ? kUseTrapHandler : kNoTrapHandler,
runtime_exception_support_, enabled_features_, lower_simd()};
}
......
......@@ -256,7 +256,6 @@ class TestingModuleBuilder {
private:
std::shared_ptr<WasmModule> test_module_;
WasmModule* test_module_ptr_;
Isolate* isolate_;
WasmFeatures enabled_features_;
uint32_t global_offset = 0;
......
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