electron/patches/node/deprecate_vector_v8_local_i...

26 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Sun, 10 Mar 2024 16:59:30 +0100
Subject: Deprecate vector<v8::Local> in v8
Adapts for changes in https://chromium-review.googlesource.com/c/v8/v8/+/4866222.
This patch can be removed when Electron upgrades to a version of Node.js that
contains the above CL.
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index cce67100588bf6b47d26ee9168a123cb813b822e..9ad67e0993da4c3e3f8a14681edbf941cf14e2e6 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -169,7 +169,9 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
export_names[i] = export_name_val.As<String>();
}
- module = Module::CreateSyntheticModule(isolate, url, export_names,
+
+ module = Module::CreateSyntheticModule(isolate, url,
+ v8::MemorySpan<const Local<String>>(export_names.begin(), export_names.end()),
SyntheticModuleEvaluationStepsCallback);
} else {
ScriptCompiler::CachedData* cached_data = nullptr;