From a04e95f8f1b08b4d026c4c8761024929c7cf7d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 26 Sep 2023 14:42:18 +0200 Subject: [PATCH] src: use non-deprecated version of CreateSyntheticModule Refs: https://github.com/v8/v8/commit/8ff02b7d93480a18c315ff88b9e460fe2b6fb2ca PR-URL: https://github.com/nodejs/node/pull/50115 Reviewed-By: Rafael Gonzaga Reviewed-By: Michael Dawson --- src/module_wrap.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 99802b372f..a70d0ccbd7 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -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; @@ -168,8 +169,10 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { export_names[i] = export_name_val.As(); } - module = Module::CreateSyntheticModule(isolate, url, export_names, - SyntheticModuleEvaluationStepsCallback); + const MemorySpan> span(export_names.begin(), + export_names.size()); + module = Module::CreateSyntheticModule( + isolate, url, span, SyntheticModuleEvaluationStepsCallback); } else { ScriptCompiler::CachedData* cached_data = nullptr; if (!args[5]->IsUndefined()) {