Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index 6dc14952a01e943b8bd5a9fc012c8d648c59dbae..fa9edf4d491f9c3e95c2ecd1808513c777d0c2b5 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -192,9 +192,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())); |
+ } |
} |
} |