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()) {