| Index: src/wasm/wasm-js.cc
|
| diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
|
| index 5b2020bc27d6f969ea838a430aab187dbed0d8d8..3d0032c9bd82f80ebd272b0fefcd31bb33984d09 100644
|
| --- a/src/wasm/wasm-js.cc
|
| +++ b/src/wasm/wasm-js.cc
|
| @@ -156,6 +156,8 @@ i::MaybeHandle<i::JSObject> InstantiateModule(
|
| const v8::FunctionCallbackInfo<v8::Value>& args, const byte* start,
|
| const byte* end, ErrorThrower* thrower,
|
| internal::wasm::ModuleOrigin origin = i::wasm::kWasmOrigin) {
|
| + i::Handle<i::Context> context =
|
| + v8::Utils::OpenHandle(*(args.GetIsolate()->GetCurrentContext()));
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
|
|
|
| // Decode but avoid a redundant pass over function bodies for verification.
|
| @@ -187,7 +189,7 @@ i::MaybeHandle<i::JSObject> InstantiateModule(
|
| if (!thrower->error()) {
|
| DCHECK(!compiled_module.is_null());
|
| object = i::wasm::WasmModule::Instantiate(
|
| - isolate, compiled_module.ToHandleChecked(), ffi, memory);
|
| + isolate, context, compiled_module.ToHandleChecked(), ffi, memory);
|
| if (!object.is_null()) {
|
| args.GetReturnValue().Set(v8::Utils::ToLocal(object.ToHandleChecked()));
|
| }
|
| @@ -394,8 +396,8 @@ void WebAssemblyInstance(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| i::Handle<i::Object> mem_obj = v8::Utils::OpenHandle(*obj);
|
| memory = i::Handle<i::JSArrayBuffer>(i::JSArrayBuffer::cast(*mem_obj));
|
| }
|
| - i::MaybeHandle<i::JSObject> instance =
|
| - i::wasm::WasmModule::Instantiate(i_isolate, compiled_code, ffi, memory);
|
| + i::MaybeHandle<i::JSObject> instance = i::wasm::WasmModule::Instantiate(
|
| + i_isolate, i_context, compiled_code, ffi, memory);
|
| if (instance.is_null()) {
|
| thrower.Error("Could not instantiate module");
|
| return;
|
|
|