Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index bcccf2e3ebcd4a10c454392f5b1530a9405a2ef1..2189cde8f19199750bb52c2624b25bc93259c5f2 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -197,9 +197,14 @@ i::MaybeHandle<i::JSObject> InstantiateModuleCommon( |
memory = i::Handle<i::JSArrayBuffer>(i::JSArrayBuffer::cast(*mem_obj)); |
} |
- object = result.val->Instantiate(isolate, ffi, memory); |
- if (!object.is_null()) { |
- args.GetReturnValue().Set(v8::Utils::ToLocal(object.ToHandleChecked())); |
+ i::MaybeHandle<i::FixedArray> compiled_module = |
+ result.val->CompileFunctions(isolate); |
+ if (!compiled_module.is_null()) { |
+ object = i::wasm::WasmModule::Instantiate( |
+ isolate, compiled_module.ToHandleChecked(), ffi, memory); |
+ if (!object.is_null()) { |
+ args.GetReturnValue().Set(v8::Utils::ToLocal(object.ToHandleChecked())); |
+ } |
} |
} |