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: #50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
targos committed Jan 4, 2024
1 parent 941cef5 commit 4782818
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 4782818

Please sign in to comment.