From fc9b44e55c8e11ce4a65b3f5247b9cbdf2ab14e0 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Mon, 15 Nov 2021 15:34:38 +0100 Subject: [PATCH] update --- src/module_wrap.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index aeb0d2cb37313b..1e049d7258d21c 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -46,7 +46,6 @@ using v8::PrimitiveArray; using v8::Promise; using v8::ScriptCompiler; using v8::ScriptOrigin; -using v8::ScriptOrModule; using v8::String; using v8::UnboundModuleScript; using v8::Undefined; @@ -559,7 +558,8 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( static MaybeLocal ImportModuleDynamically( Local context, - Local referrer, + Local host_defined_options, + Local resource_name, Local specifier, Local import_assertions) { Isolate* isolate = context->GetIsolate(); @@ -574,7 +574,7 @@ static MaybeLocal ImportModuleDynamically( Local import_callback = env->host_import_module_dynamically_callback(); - Local options = referrer->GetHostDefinedOptions(); + Local options = host_defined_options.As(); if (options->Length() != HostDefinedOptions::kLength) { Local resolver; if (!Promise::Resolver::New(context).ToLocal(&resolver)) return {}; @@ -588,11 +588,11 @@ static MaybeLocal ImportModuleDynamically( Local object; - int type = options->Get(isolate, HostDefinedOptions::kType) + int type = options->Get(context, HostDefinedOptions::kType) .As() ->Int32Value(context) .ToChecked(); - uint32_t id = options->Get(isolate, HostDefinedOptions::kID) + uint32_t id = options->Get(context, HostDefinedOptions::kID) .As() ->Uint32Value(context) .ToChecked();