Skip to content

Commit

Permalink
src: use non-deprecated version of CreateSyntheticModule
Browse files Browse the repository at this point in the history
  • Loading branch information
targos authored and nodejs-github-bot committed Oct 9, 2023
1 parent e61053f commit da7e052
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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 @@ -168,7 +169,8 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
export_names[i] = export_name_val.As<String>();
}

module = Module::CreateSyntheticModule(isolate, url, export_names,
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;
Expand Down

0 comments on commit da7e052

Please sign in to comment.