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

Unified Diff: test/common/wasm/wasm-module-runner.cc

Issue 2695813005: [wasm] Split the compilation and instantiation API into sync and async methods. (Closed)
Patch Set: [wasm] Split the compilation and instantiation API into sync and async methods. Created 3 years, 10 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 | « test/cctest/wasm/test-run-wasm-module.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/common/wasm/wasm-module-runner.cc
diff --git a/test/common/wasm/wasm-module-runner.cc b/test/common/wasm/wasm-module-runner.cc
index d4b1772cb29e1dffc3b2ce3c3aed863ce7ed8674..3036480087dfa080e182c26f4f759826d072c813 100644
--- a/test/common/wasm/wasm-module-runner.cc
+++ b/test/common/wasm/wasm-module-runner.cc
@@ -59,17 +59,15 @@ const Handle<WasmInstanceObject> InstantiateModuleForTesting(
// Although we decoded the module for some pre-validation, run the bytes
// again through the normal pipeline.
// TODO(wasm): Use {module} instead of decoding the module bytes again.
- MaybeHandle<WasmModuleObject> module_object = CreateModuleObjectFromBytes(
- isolate, wire_bytes.start(), wire_bytes.end(), thrower,
- ModuleOrigin::kWasmOrigin, Handle<Script>::null(),
- Vector<const byte>::empty());
+ MaybeHandle<WasmModuleObject> module_object =
+ SyncCompile(isolate, thrower, wire_bytes);
if (module_object.is_null()) {
thrower->CompileError("Module pre-validation failed.");
return Handle<WasmInstanceObject>::null();
}
MaybeHandle<WasmInstanceObject> maybe_instance =
- WasmModule::Instantiate(isolate, thrower, module_object.ToHandleChecked(),
- Handle<JSReceiver>::null());
+ SyncInstantiate(isolate, thrower, module_object.ToHandleChecked(),
+ Handle<JSReceiver>::null(), MaybeHandle<JSArrayBuffer>());
Handle<WasmInstanceObject> instance;
if (!maybe_instance.ToHandle(&instance)) {
return Handle<WasmInstanceObject>::null();
« no previous file with comments | « test/cctest/wasm/test-run-wasm-module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698