chore: bump node to v20.18.0 (main) (#44119)

* chore: bump node in DEPS to v20.18.0

* chore: update patches

* src: improve buffer.transcode performance

https://github.com/nodejs/node/pull/54153

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
electron-roller[bot] 2024-10-07 18:51:08 -04:00 committed by GitHub
parent ab1488a1be
commit b95ee8964c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 216 additions and 247 deletions

View file

@ -13,7 +13,7 @@ CL: https://chromium-review.googlesource.com/c/v8/v8/+/5630388
This patch can be removed when the node change is incorporated into main.
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd295fe5412 100644
index 28ba7dbe66a44a43c39e3d75edf0be9513bcf732..0401b968916e5f45d148281c74b7e465e11439b8 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -49,6 +49,7 @@ using v8::FunctionTemplate;
@ -24,7 +24,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
using v8::Isolate;
using v8::Just;
using v8::Local;
@@ -457,14 +458,15 @@ bool ContextifyContext::IsStillInitializing(const ContextifyContext* ctx) {
@@ -484,14 +485,15 @@ bool ContextifyContext::IsStillInitializing(const ContextifyContext* ctx) {
}
// static
@ -44,7 +44,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
Local<Context> context = ctx->context();
Local<Object> sandbox = ctx->sandbox();
@@ -488,18 +490,22 @@ void ContextifyContext::PropertyGetterCallback(
@@ -515,18 +517,22 @@ void ContextifyContext::PropertyGetterCallback(
rv = ctx->global_proxy();
args.GetReturnValue().Set(rv);
@ -70,7 +70,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
Local<Context> context = ctx->context();
PropertyAttribute attributes = PropertyAttribute::None;
@@ -517,8 +523,9 @@ void ContextifyContext::PropertySetterCallback(
@@ -544,8 +550,9 @@ void ContextifyContext::PropertySetterCallback(
(static_cast<int>(attributes) &
static_cast<int>(PropertyAttribute::ReadOnly));
@ -82,7 +82,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
// true for x = 5
// false for this.x = 5
@@ -537,11 +544,16 @@ void ContextifyContext::PropertySetterCallback(
@@ -564,11 +571,16 @@ void ContextifyContext::PropertySetterCallback(
bool is_declared = is_declared_on_global_proxy || is_declared_on_sandbox;
if (!is_declared && args.ShouldThrowOnError() && is_contextual_store &&
@ -103,7 +103,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
Local<Value> desc;
if (is_declared_on_sandbox &&
@@ -555,19 +567,23 @@ void ContextifyContext::PropertySetterCallback(
@@ -582,19 +594,23 @@ void ContextifyContext::PropertySetterCallback(
// We have to specify the return value for any contextual or get/set
// property
if (desc_obj->HasOwnProperty(context, env->get_string()).FromMaybe(false) ||
@ -132,7 +132,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
Local<Context> context = ctx->context();
@@ -577,19 +593,23 @@ void ContextifyContext::PropertyDescriptorCallback(
@@ -604,19 +620,23 @@ void ContextifyContext::PropertyDescriptorCallback(
Local<Value> desc;
if (sandbox->GetOwnPropertyDescriptor(context, property).ToLocal(&desc)) {
args.GetReturnValue().Set(desc);
@ -159,7 +159,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
Local<Context> context = ctx->context();
Isolate* isolate = context->GetIsolate();
@@ -608,7 +628,7 @@ void ContextifyContext::PropertyDefinerCallback(
@@ -635,7 +655,7 @@ void ContextifyContext::PropertyDefinerCallback(
// If the property is set on the global as neither writable nor
// configurable, don't change it on the global or sandbox.
if (is_declared && read_only && dont_delete) {
@ -168,7 +168,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
}
Local<Object> sandbox = ctx->sandbox();
@@ -631,6 +651,9 @@ void ContextifyContext::PropertyDefinerCallback(
@@ -658,6 +678,9 @@ void ContextifyContext::PropertyDefinerCallback(
desc.has_set() ? desc.set() : Undefined(isolate).As<Value>());
define_prop_on_sandbox(&desc_for_sandbox);
@ -178,7 +178,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
} else {
Local<Value> value =
desc.has_value() ? desc.value() : Undefined(isolate).As<Value>();
@@ -642,26 +665,32 @@ void ContextifyContext::PropertyDefinerCallback(
@@ -669,26 +692,32 @@ void ContextifyContext::PropertyDefinerCallback(
PropertyDescriptor desc_for_sandbox(value);
define_prop_on_sandbox(&desc_for_sandbox);
}
@ -217,7 +217,7 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
}
// static
@@ -681,76 +710,84 @@ void ContextifyContext::PropertyEnumeratorCallback(
@@ -708,76 +737,84 @@ void ContextifyContext::PropertyEnumeratorCallback(
}
// static
@ -328,10 +328,10 @@ index 4b7c4556d4cc94f589065409ed2a0aca497c99d0..b4d6116f0c84b0cf3e1045c6b9571fd2
void ContextifyScript::CreatePerIsolateProperties(
diff --git a/src/node_contextify.h b/src/node_contextify.h
index d42b5e0c544e726fc3f6d8392a554df9aa480fe9..ea2d513463057715127cb4b4f2d66b4cfcf71351 100644
index 10715c7eb07715cc11e49734bd54747dad95f6a4..49b9fabb399aed962e0d29e784a25ca4e9780a8f 100644
--- a/src/node_contextify.h
+++ b/src/node_contextify.h
@@ -107,42 +107,39 @@ class ContextifyContext : public BaseObject {
@@ -111,42 +111,39 @@ class ContextifyContext : public BaseObject {
const v8::FunctionCallbackInfo<v8::Value>& args);
static void WeakCallback(
const v8::WeakCallbackInfo<ContextifyContext>& data);
@ -541,10 +541,10 @@ index bce7ae07214ddf970a530db29ed6970e14b7a5ed..85f82180d48d6cfd7738cd7b1e504f23
}
diff --git a/src/node_external_reference.h b/src/node_external_reference.h
index 9238f2d4d7376b22e264dbc9359b480937d29676..b5c1df6941616642075babdad81be00ce63ffd56 100644
index c4aba23510872d66b58a1adc88cdd1ee85a86cfe..6d9988810b951771064de523bc20aaf389a9c08a 100644
--- a/src/node_external_reference.h
+++ b/src/node_external_reference.h
@@ -59,16 +59,17 @@ class ExternalReferenceRegistry {
@@ -66,16 +66,17 @@ class ExternalReferenceRegistry {
V(v8::FunctionCallback) \
V(v8::AccessorNameGetterCallback) \
V(v8::AccessorNameSetterCallback) \