GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: update ImportModuleDynamically · hernanc/node@aa7dc80

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • module_wrap.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/module_wrap.cc‎

Copy file name to clipboardExpand all lines: src/module_wrap.cc
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ using v8::PrimitiveArray;
4646
using v8::Promise;
4747
using v8::ScriptCompiler;
4848
using v8::ScriptOrigin;
49-
using v8::ScriptOrModule;
5049
using v8::String;
5150
using v8::UnboundModuleScript;
5251
using v8::Undefined;
@@ -559,7 +558,8 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
559558

560559
static MaybeLocal<Promise> ImportModuleDynamically(
561560
Local<Context> context,
562-
Local<ScriptOrModule> referrer,
561+
Local<v8::Data> host_defined_options,
562+
Local<Value> resource_name,
563563
Local<String> specifier,
564564
Local<FixedArray> import_assertions) {
565565
Isolate* isolate = context->GetIsolate();
@@ -574,7 +574,7 @@ static MaybeLocal<Promise> ImportModuleDynamically(
574574
Local<Function> import_callback =
575575
env->host_import_module_dynamically_callback();
576576

577-
Local<PrimitiveArray> options = referrer->GetHostDefinedOptions();
577+
Local<FixedArray> options = host_defined_options.As<FixedArray>();
578578
if (options->Length() != HostDefinedOptions::kLength) {
579579
Local<Promise::Resolver> resolver;
580580
if (!Promise::Resolver::New(context).ToLocal(&resolver)) return {};
@@ -588,11 +588,11 @@ static MaybeLocal<Promise> ImportModuleDynamically(
588588

589589
Local<Value> object;
590590

591-
int type = options->Get(isolate, HostDefinedOptions::kType)
591+
int type = options->Get(context, HostDefinedOptions::kType)
592592
.As<Number>()
593593
->Int32Value(context)
594594
.ToChecked();
595-
uint32_t id = options->Get(isolate, HostDefinedOptions::kID)
595+
uint32_t id = options->Get(context, HostDefinedOptions::kID)
596596
.As<Number>()
597597
->Uint32Value(context)
598598
.ToChecked();

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.