Skip to content

Commit

Permalink
src: use non-deprecated version of CreateSyntheticModule
Browse files Browse the repository at this point in the history
Refs: v8/v8@8ff02b7
PR-URL: nodejs#50115
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
targos authored and Medhansh404 committed Jan 19, 2024
1 parent 8d010d5 commit b23d431
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ using v8::IntegrityLevel;
using v8::Isolate;
using v8::Local;
using v8::MaybeLocal;
using v8::MemorySpan;
using v8::MicrotaskQueue;
using v8::Module;
using v8::ModuleRequest;
Expand Down Expand Up @@ -170,8 +171,10 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
export_names[i] = export_name_val.As<String>();
}

module = Module::CreateSyntheticModule(isolate, url, export_names,
SyntheticModuleEvaluationStepsCallback);
const MemorySpan<const Local<String>> span(export_names.begin(),
export_names.size());
module = Module::CreateSyntheticModule(
isolate, url, span, SyntheticModuleEvaluationStepsCallback);
} else {
ScriptCompiler::CachedData* cached_data = nullptr;
if (!args[5]->IsUndefined()) {
Expand Down

0 comments on commit b23d431

Please sign in to comment.