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

Unified Diff: src/api.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 | « src/api.h ('k') | src/asmjs/asm-js.cc » ('j') | src/wasm/wasm-js.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 955e0832ed73317ff32242d9675d51416d5bc0ff..7d330a1b89f87e94556d32f4d7bc31c3b00f4884 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7542,11 +7542,8 @@ MaybeLocal<WasmCompiledModule> WasmCompiledModule::Compile(Isolate* isolate,
size_t length) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
i::wasm::ErrorThrower thrower(i_isolate, "WasmCompiledModule::Deserialize()");
- i::MaybeHandle<i::JSObject> maybe_compiled =
- i::wasm::CreateModuleObjectFromBytes(
- i_isolate, start, start + length, &thrower,
- i::wasm::ModuleOrigin::kWasmOrigin, i::Handle<i::Script>::null(),
- i::Vector<const uint8_t>::empty());
+ i::MaybeHandle<i::JSObject> maybe_compiled = i::wasm::SyncCompile(
+ i_isolate, &thrower, i::wasm::ModuleWireBytes(start, start + length));
if (maybe_compiled.is_null()) return MaybeLocal<WasmCompiledModule>();
return Local<WasmCompiledModule>::Cast(
Utils::ToLocal(maybe_compiled.ToHandleChecked()));
« no previous file with comments | « src/api.h ('k') | src/asmjs/asm-js.cc » ('j') | src/wasm/wasm-js.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698