@@ -46,7 +46,6 @@ using v8::PrimitiveArray;
46
46
using v8::Promise;
47
47
using v8::ScriptCompiler;
48
48
using v8::ScriptOrigin;
49
- using v8::ScriptOrModule;
50
49
using v8::String;
51
50
using v8::UnboundModuleScript;
52
51
using v8::Undefined;
@@ -559,7 +558,8 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
559
558
560
559
static MaybeLocal<Promise> ImportModuleDynamically (
561
560
Local<Context> context,
562
- Local<ScriptOrModule> referrer,
561
+ Local<v8::Data> host_defined_options,
562
+ Local<Value> resource_name,
563
563
Local<String> specifier,
564
564
Local<FixedArray> import_assertions) {
565
565
Isolate* isolate = context->GetIsolate ();
@@ -574,7 +574,7 @@ static MaybeLocal<Promise> ImportModuleDynamically(
574
574
Local<Function> import_callback =
575
575
env->host_import_module_dynamically_callback ();
576
576
577
- Local<PrimitiveArray > options = referrer-> GetHostDefinedOptions ();
577
+ Local<FixedArray > options = host_defined_options. As <FixedArray> ();
578
578
if (options->Length () != HostDefinedOptions::kLength ) {
579
579
Local<Promise::Resolver> resolver;
580
580
if (!Promise::Resolver::New (context).ToLocal (&resolver)) return {};
@@ -588,11 +588,11 @@ static MaybeLocal<Promise> ImportModuleDynamically(
588
588
589
589
Local<Value> object;
590
590
591
- int type = options->Get (isolate , HostDefinedOptions::kType )
591
+ int type = options->Get (context , HostDefinedOptions::kType )
592
592
.As <Number>()
593
593
->Int32Value (context)
594
594
.ToChecked ();
595
- uint32_t id = options->Get (isolate , HostDefinedOptions::kID )
595
+ uint32_t id = options->Get (context , HostDefinedOptions::kID )
596
596
.As <Number>()
597
597
->Uint32Value (context)
598
598
.ToChecked ();
0 commit comments