Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: test/cctest/wasm/test-run-wasm-module.cc

Issue 2424623002: [wasm] Use a Managed<WasmModule> to hold metadata about modules. (Closed)
Patch Set: [wasm] Use a Managed<WasmModule> to hold metadata about modules. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-module.cc
diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
index 4f4f496d6b21956558908e981293fc21f9a8927e..e059951018731a6ee108860c0c4b78ff88f12710 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -277,15 +277,18 @@ class WasmSerializationTest {
testing::SetupIsolateForWasmModule(serialization_isolate);
ModuleResult decoding_result =
- DecodeWasmModule(serialization_isolate, zone(), buffer.begin(),
- buffer.end(), false, kWasmOrigin);
- std::unique_ptr<const WasmModule> module(decoding_result.val);
+ DecodeWasmModule(serialization_isolate, buffer.begin(), buffer.end(),
+ false, kWasmOrigin);
CHECK(!decoding_result.failed());
+ Handle<WasmModuleWrapper> module_wrapper = WasmModuleWrapper::New(
+ serialization_isolate, const_cast<WasmModule*>(decoding_result.val));
+
MaybeHandle<WasmCompiledModule> compiled_module =
- module->CompileFunctions(serialization_isolate, &thrower);
+ decoding_result.val->CompileFunctions(serialization_isolate,
+ module_wrapper, &thrower);
CHECK(!compiled_module.is_null());
- Handle<JSObject> module_obj = CreateCompiledModuleObject(
+ Handle<JSObject> module_obj = CreateWasmModuleObject(
serialization_isolate, compiled_module.ToHandleChecked(),
ModuleOrigin::kWasmOrigin);
v8::Local<v8::Object> v8_module_obj = v8::Utils::ToLocal(module_obj);
@@ -470,7 +473,7 @@ TEST(TestInterruptLoop) {
ErrorThrower thrower(isolate, "Test");
const Handle<JSObject> instance =
testing::CompileInstantiateWasmModuleForTesting(
- isolate, &thrower, &zone, buffer.begin(), buffer.end(),
+ isolate, &thrower, buffer.begin(), buffer.end(),
ModuleOrigin::kWasmOrigin);
CHECK(!instance.is_null());
@@ -544,7 +547,7 @@ TEST(Run_WasmModule_GrowMemOobFixedIndex) {
ErrorThrower thrower(isolate, "Test");
Handle<JSObject> instance = testing::CompileInstantiateWasmModuleForTesting(
- isolate, &thrower, &zone, buffer.begin(), buffer.end(),
+ isolate, &thrower, buffer.begin(), buffer.end(),
ModuleOrigin::kWasmOrigin);
CHECK(!instance.is_null());
@@ -589,7 +592,7 @@ TEST(Run_WasmModule_GrowMemOobVariableIndex) {
ErrorThrower thrower(isolate, "Test");
Handle<JSObject> instance = testing::CompileInstantiateWasmModuleForTesting(
- isolate, &thrower, &zone, buffer.begin(), buffer.end(),
+ isolate, &thrower, buffer.begin(), buffer.end(),
ModuleOrigin::kWasmOrigin);
CHECK(!instance.is_null());
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698