chore: bump node to v18.14.0 (main) (#37129)

* chore: bump node in DEPS to v18.14.0

* src: add support for externally shared js builtins

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

* test: fix test broken under --node-builtin-modules-path

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

* build: add option to disable shared readonly heap

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

* src: remove unnecessary semicolons

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

* src: remove return after abort

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

* chore: fixup patch indices

* test_runner: parse yaml

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

* src: use simdutf for converting externalized builtins to UTF-16

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

* src: rename internal module declaration as internal bindings

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
electron-roller[bot] 2023-02-07 15:51:07 -05:00 committed by GitHub
parent 7abe38b46e
commit de607cbcde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 98 additions and 131 deletions

2
DEPS
View file

@ -4,7 +4,7 @@ vars = {
'chromium_version':
'111.0.5560.0',
'node_version':
'v18.13.0',
'v18.14.0',
'nan_version':
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
'squirrel.mac_version':

View file

@ -34,5 +34,3 @@ fix_expose_lookupandcompile_with_parameters.patch
fix_prevent_changing_functiontemplateinfo_after_publish.patch
enable_crashpad_linux_node_processes.patch
allow_embedder_to_control_codegenerationfromstringscallback.patch
chore_remove_errant_semicolons.patch
chore_remove_unreached_return.patch

View file

@ -8,10 +8,10 @@ This is needed to blend Blink and Node's code generation policy.
This should be upstreamed.
diff --git a/src/api/environment.cc b/src/api/environment.cc
index c0c422e969543dcd570dabfd8ff0755abe37face..4f14b308d14f3653c8646345a5b375014a51851f 100644
index e3c42d892eed8dd605301348c08ad24f4362a7aa..c718b9919bb30627e5da2b92a8de58c494bf4b93 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -267,11 +267,15 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
@@ -268,11 +268,15 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
isolate->SetMicrotasksPolicy(s.policy);

View file

@ -9,7 +9,7 @@ This patch can be removed when Node.js updates to a V8 version containing
the above CL.
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 323fc7d4ff635ca287ee241cee234da0600340a2..36ab78f739f3faecab47eead99f9aa3c403672c0 100644
index 9f620154ce3696cff90bf308da934147319b1096..806d9700ca4b5faf46042814c0e2ce212945bece 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -495,9 +495,9 @@ void OnFatalError(const char* location, const char* message) {
@ -25,7 +25,7 @@ index 323fc7d4ff635ca287ee241cee234da0600340a2..36ab78f739f3faecab47eead99f9aa3c
if (location) {
FPrintF(stderr, "FATAL ERROR: %s %s\n", location, message);
diff --git a/src/node_errors.h b/src/node_errors.h
index 926f54286ec72fda98a9a477ac8e22feef522291..f926cc1c70dd6f883c0729c46f09e10972ce6385 100644
index 850d437acdfe09fc43a7a37790c2926e6109749d..5a33d17b0e90e8ca8dc670e14f93de8fef99d526 100644
--- a/src/node_errors.h
+++ b/src/node_errors.h
@@ -21,7 +21,7 @@ void AppendExceptionLine(Environment* env,

View file

@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..db80a8f00a84bf54f723c21300e7579c994d0514
index 0000000000000000000000000000000000000000..5e8577795316984f3073204523d82a17f44b0f88
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,438 @@
@@ -0,0 +1,439 @@
+import("//v8/gni/v8.gni")
+import("node.gni")
+
@ -223,8 +223,9 @@ index 0000000000000000000000000000000000000000..db80a8f00a84bf54f723c21300e7579c
+ deps = [
+ ":node_js2c",
+ "deps/googletest:gtest",
+ "deps/uvwasi",
+ "deps/base64",
+ "deps/simdutf",
+ "deps/uvwasi",
+ "//third_party/zlib",
+ "//third_party/brotli:dec",
+ "//third_party/brotli:enc",
@ -945,6 +946,32 @@ index 0000000000000000000000000000000000000000..23eed033d31eced6a85c794eee550655
+ "lib/nghttp2_version.c",
+ ]
+}
diff --git a/deps/simdutf/BUILD.gn b/deps/simdutf/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..bfbd4e656db1a6c73048443f96f1d576a0df7519
--- /dev/null
+++ b/deps/simdutf/BUILD.gn
@@ -0,0 +1,20 @@
+config("simdutf_config") {
+ include_dirs = [ "." ]
+}
+
+static_library("simdutf") {
+ include_dirs = [ "." ]
+ sources = [
+ "simdutf.cpp",
+ ]
+
+ public_configs = [ ":simdutf_config" ]
+
+ cflags_cc = [
+ "-Wno-ambiguous-reversed-operator",
+ "-Wno-c++98-compat-extra-semi",
+ "-Wno-unreachable-code-break",
+ "-Wno-unused-const-variable",
+ "-Wno-unused-function",
+ ]
+}
diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..d6bed57461820ce08391fc424a1f842bd282fa75
@ -1193,7 +1220,7 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..a991bef2b98766a1cfb248d2af97101af305de82
index 0000000000000000000000000000000000000000..2a9146e592429c1726527353c6484bd4534731b1
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,653 @@
@ -1358,7 +1385,6 @@ index 0000000000000000000000000000000000000000..a991bef2b98766a1cfb248d2af97101a
+ "lib/internal/assert.js",
+ "lib/internal/assert/assertion_error.js",
+ "lib/internal/assert/calltracker.js",
+ "lib/internal/assert/snapshot.js",
+ "lib/internal/async_hooks.js",
+ "lib/internal/blob.js",
+ "lib/internal/blocklist.js",
@ -1548,6 +1574,7 @@ index 0000000000000000000000000000000000000000..a991bef2b98766a1cfb248d2af97101a
+ "lib/internal/test_runner/tap_stream.js",
+ "lib/internal/test_runner/test.js",
+ "lib/internal/test_runner/utils.js",
+ "lib/internal/test_runner/yaml_parser.js",
+ "lib/internal/timers.js",
+ "lib/internal/tls/secure-context.js",
+ "lib/internal/tls/secure-pair.js",
@ -2091,7 +2118,7 @@ index 0000000000000000000000000000000000000000..d1d6b51e8c0c5bc6a5d09e217eb30483
+ args = rebase_path(inputs + outputs, root_build_dir)
+}
diff --git a/src/node_version.h b/src/node_version.h
index d6b2f18cf8599ed7994954c808379565b740ac83..cd73f646bb3e9dbc4d9f4a3f24ef5970ec33b3a5 100644
index c42b070a3367283155f9ff6b861b9f0160b5e9ed..ff8a64174e6f09af533b2fe05b2fe6e600624910 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -89,7 +89,10 @@

View file

@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
diff --git a/common.gypi b/common.gypi
index 6704d96142f806be9c0605f0b41206e77f492b96..f1404d27e14ce7143d3b2dbccde7af8269369cbf 100644
index b661dc4a1b3149e780eef46033e70e68038417b0..15b6155017233ed9d4c60c2453f498ba8a33403d 100644
--- a/common.gypi
+++ b/common.gypi
@@ -79,6 +79,8 @@
@ -40,10 +40,10 @@ index 6704d96142f806be9c0605f0b41206e77f492b96..f1404d27e14ce7143d3b2dbccde7af82
'defines': [
'V8_COMPRESS_POINTERS',
diff --git a/configure.py b/configure.py
index bae674fd264ff0bfbe025c286279182358872b23..1f3c398c034d2c0bf0eca51b892ca87c3fcf7ce1 100755
index 171afd04030e6933da054db866d44428ae808acf..363bf746101c85630a6c52146303986e7e0dcdce 100755
--- a/configure.py
+++ b/configure.py
@@ -1511,6 +1511,7 @@ def configure_library(lib, output, pkgname=None):
@@ -1517,6 +1517,7 @@ def configure_library(lib, output, pkgname=None):
def configure_v8(o):

View file

@ -8,7 +8,7 @@ Aligns common.gypi with the current build flag state of //v8.
Specifically enables `V8_ENABLE_SANDBOX`, `V8_SANDBOXED_POINTERS`, `V8_COMPRESS_POINTERS` and `V8_COMPRESS_POINTERS_IN_SHARED_CAGE`.
diff --git a/common.gypi b/common.gypi
index cbbc7264c6ad097c5da4902ac1bdbdcebfdd36af..6704d96142f806be9c0605f0b41206e77f492b96 100644
index 2c2f3218a8ae387802af3d154ede601aedcb52dd..b661dc4a1b3149e780eef46033e70e68038417b0 100644
--- a/common.gypi
+++ b/common.gypi
@@ -65,6 +65,7 @@
@ -42,14 +42,14 @@ index cbbc7264c6ad097c5da4902ac1bdbdcebfdd36af..6704d96142f806be9c0605f0b41206e7
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
}],
diff --git a/configure.py b/configure.py
index 81d54a14b7af51b77b6340a4f7bf605d6f1656bc..bae674fd264ff0bfbe025c286279182358872b23 100755
index 0a45c07f587ed8d21dff45d523b7074606c586ac..171afd04030e6933da054db866d44428ae808acf 100755
--- a/configure.py
+++ b/configure.py
@@ -1524,6 +1524,7 @@ def configure_v8(o):
@@ -1530,6 +1530,7 @@ def configure_v8(o):
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
+ o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression else 1
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)

View file

@ -14,10 +14,10 @@ renderer/browser/worker/sandboxed bootstrap scripts). These are loaded
through LoadEmbedderJavaScriptSource()
diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
index 7b820e70df1613a9f5565d6221b71354ff059560..405bda5d83c3312909439082ef69e8f266e53c2e 100644
index bc4555584ab1f97806a1e9cd17085a2488320908..b17dbf2a98c9f4b14fea60c87f05afcee6ec54fb 100644
--- a/lib/internal/fs/watchers.js
+++ b/lib/internal/fs/watchers.js
@@ -290,11 +290,13 @@ function emitCloseNT(self) {
@@ -293,11 +293,13 @@ function emitCloseNT(self) {
// Legacy alias on the C++ wrapper object. This is not public API, so we may
// want to runtime-deprecate it at some point. There's no hurry, though.
@ -28,31 +28,31 @@ index 7b820e70df1613a9f5565d6221b71354ff059560..405bda5d83c3312909439082ef69e8f2
-});
+if (!'owner' in FSEvent.prototype) {
+ ObjectDefineProperty(FSEvent.prototype, 'owner', {
+ __proto__: null,
+ __proto__: null,
+ get() { return this[owner_symbol]; },
+ set(v) { return this[owner_symbol] = v; }
+ });
+}
async function* watch(filename, options = {}) {
async function* watch(filename, options = kEmptyObject) {
const path = toNamespacedPath(getValidatedPath(filename));
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 9d82a06adcefe386ea230c7cfbdccffb67d0b8c1..6e1a55adbd0b01383f3e54e924864dfeb6a57f0b 100644
index 40d9025746d3c39cf9ea27b6cffc8f2eb7e62c1e..d3a0dd7cedb0d239ae427d1af2335e155345a454 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -32,6 +32,7 @@ BuiltinLoader BuiltinLoader::instance_;
@@ -33,6 +33,7 @@ BuiltinLoader BuiltinLoader::instance_;
BuiltinLoader::BuiltinLoader() : config_(GetConfig()), has_code_cache_(false) {
LoadJavaScriptSource();
+ LoadEmbedderJavaScriptSource();
#if defined(NODE_HAVE_I18N_SUPPORT)
#ifdef NODE_SHARED_BUILTIN_CJS_MODULE_LEXER_LEXER_PATH
AddExternalizedBuiltin(
"internal/deps/cjs-module-lexer/lexer",
diff --git a/src/node_builtins.h b/src/node_builtins.h
index a6fbff98ccb0a7f5fd33cf3b084cfdf47aaa995e..8228e57d27b2f883d87ec12274f2745628caa6e1 100644
index 90b158b84bb2a66781cf92f5b4c1a64f9e2ee651..8d9f7c409659a30747e5feeac6cfec4208791370 100644
--- a/src/node_builtins.h
+++ b/src/node_builtins.h
@@ -73,6 +73,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
@@ -71,6 +71,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
// Generated by tools/js2c.py as node_javascript.cc
void LoadJavaScriptSource(); // Loads data into source_

View file

@ -8,7 +8,7 @@ modules from being used in the renderer process. This should be upstreamed as
a customizable error message.
diff --git a/src/node_binding.cc b/src/node_binding.cc
index c4e6347f6f302b46fe4569f543335e426cd4ded5..f772e71521c71edd7d40b0489c5fc875357e3790 100644
index 175d0bee02d3592891f671533857b737057ab684..cf1cbcd54448754c7199a128b5447945aecf3e92 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -4,6 +4,7 @@

View file

@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
of this.
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 44e4c22ebf39fc9c52f789173a2cc50300bcd181..035de64bf1f0ab46de2b803edeaf0596c8bf68a0 100644
index 207142322bba89e94f4e3052a22bef6ffebcdc39..c83d8b0db630d3fc26fb273170945c872bede091 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1192,6 +1192,13 @@ Module.prototype._compile = function(content, filename) {
@@ -1200,6 +1200,13 @@ Module.prototype._compile = function(content, filename) {
if (getOptionValue('--inspect-brk') && process._eval == null) {
if (!resolvedArgv) {
// We enter the repl if we're not given a filename argument.

View file

@ -1,36 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Mon, 9 Jan 2023 13:53:36 +0100
Subject: chore: remove errant semicolons
- https://github.com/nodejs/node/pull/44179
- https://github.com/nodejs/node/pull/44193
This should be upstreamed.
diff --git a/src/node_realm.h b/src/node_realm.h
index 9ece8cb38958c364c6177118a5e7443c3a6bdf1a..0d3259a149e94b7d9657959c0ccac25a146978b4 100644
--- a/src/node_realm.h
+++ b/src/node_realm.h
@@ -55,7 +55,7 @@ class Realm : public MemoryRetainer {
Realm& operator=(Realm&&) = delete;
SET_MEMORY_INFO_NAME(Realm)
- SET_SELF_SIZE(Realm);
+ SET_SELF_SIZE(Realm)
void MemoryInfo(MemoryTracker* tracker) const override;
void CreateProperties();
diff --git a/src/node_util.h b/src/node_util.h
index 616b8c003b2d0dd80e01297ca3fe7e4926220ad7..9590842ae4764dd3363a4d74038d3351f0061177 100644
--- a/src/node_util.h
+++ b/src/node_util.h
@@ -12,7 +12,7 @@ namespace util {
class WeakReference : public SnapshotableObject {
public:
- SERIALIZABLE_OBJECT_METHODS();
+ SERIALIZABLE_OBJECT_METHODS()
static constexpr FastStringKey type_name{"node::util::WeakReference"};
static constexpr EmbedderObjectType type_int =

View file

@ -1,22 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Mon, 9 Jan 2023 14:34:01 +0100
Subject: chore: remove unreached return
https://github.com/nodejs/node/pull/44376 added a return after a call to
ABORT(), triggering an unreachable code error.
This should be upstreamed.
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 25b02f9904127780c68db9b451a7dfcf02a6fc5e..1be20aea500fd9d606c5a38a86b4aef66b49d133 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -247,7 +247,6 @@ void BuiltinLoader::AddExternalizedBuiltin(const char* id,
fprintf(
stderr, "Cannot load externalized builtin: \"%s:%s\".\n", id, filename);
ABORT();
- return;
}
icu::UnicodeString utf16 = icu::UnicodeString::fromUTF8(

View file

@ -9,7 +9,7 @@ modules to sandboxed renderers.
TODO(codebytere): remove and replace with a public facing API.
diff --git a/src/node_binding.cc b/src/node_binding.cc
index a7a325e591eba3daf80bebb11fc3cd83891b627d..c4e6347f6f302b46fe4569f543335e426cd4ded5 100644
index c7ae1c26fe2bbade7c5b3ffdb2d30efcf8551cb9..175d0bee02d3592891f671533857b737057ab684 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -608,6 +608,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
@ -24,7 +24,7 @@ index a7a325e591eba3daf80bebb11fc3cd83891b627d..c4e6347f6f302b46fe4569f543335e42
Environment* env = Environment::GetCurrent(args);
diff --git a/src/node_binding.h b/src/node_binding.h
index 5bced5b41431dc7838d1a30774a1a41ff797290e..4233ee968fb4b3b5456997cbf1450ecf07392455 100644
index 13681bac67c64f5b9c81a034f0be1eeb2b346bb1..76898adc448c48715d8b9dc4aa782217a4fc7e05 100644
--- a/src/node_binding.h
+++ b/src/node_binding.h
@@ -91,6 +91,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);

View file

@ -7,10 +7,10 @@ Subject: feat: add kNoStartDebugSignalHandler to Environment to prevent
This patch should be upstreamed, it allows embedders to prevent the call to StartDebugSignalHandler which handles SIGUSR1 and starts the inspector agent. Apps that have --inspect disabled also don't want SIGUSR1 to have this affect.
diff --git a/src/env-inl.h b/src/env-inl.h
index fbc4fbb27b065d6a9e3ce7492a21b1eee2f334eb..59bab65f4cd6f0f977a0edc8d33b96d7fc4cdb16 100644
index bea695bd8c92d44cb9526f347a9464549155ed85..0cbd1b25c107b5deba5fdd14551cc641904f7f21 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -665,6 +665,10 @@ inline bool Environment::no_global_search_paths() const {
@@ -669,6 +669,10 @@ inline bool Environment::no_global_search_paths() const {
!options_->global_search_paths;
}
@ -22,10 +22,10 @@ index fbc4fbb27b065d6a9e3ce7492a21b1eee2f334eb..59bab65f4cd6f0f977a0edc8d33b96d7
// configure --no-browser-globals
#ifdef NODE_NO_BROWSER_GLOBALS
diff --git a/src/env.h b/src/env.h
index 4d5e72f9f44762fda4698f0bf62166d1222d1028..0cc91123f4b14439ea4f55814570c323b028ceb3 100644
index 673581fd0e2ef91886fa5e6be6523a2394df6db1..562610e6827d8302f146b81d599dd366ba25cd74 100644
--- a/src/env.h
+++ b/src/env.h
@@ -765,6 +765,7 @@ class Environment : public MemoryRetainer {
@@ -767,6 +767,7 @@ class Environment : public MemoryRetainer {
inline bool tracks_unmanaged_fds() const;
inline bool hide_console_windows() const;
inline bool no_global_search_paths() const;

View file

@ -7,7 +7,7 @@ common.gypi is a file that's included in the node header bundle, despite
the fact that we do not build node with gyp.
diff --git a/common.gypi b/common.gypi
index f3e479096776395c6465efc2597bc51918e90322..cbbc7264c6ad097c5da4902ac1bdbdcebfdd36af 100644
index 5372c8d42de531b68b97a7e8405724676ea7d5cf..2c2f3218a8ae387802af3d154ede601aedcb52dd 100644
--- a/common.gypi
+++ b/common.gypi
@@ -80,6 +80,23 @@

View file

@ -31,7 +31,7 @@ index 4e3c32fdcd23fbe3e74bd5e624b739d224689f33..19d65aae7fa8ec9f9b907733ead17a20
// Test Parallel Execution w/ KeyObject is threadsafe in openssl3
{
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js
index 162b451c5b459c566980c7d3476b3df0cef72871..db59d7fb8b46b5a6d4c77de7b5c492408351816d 100644
index d358f6b63c0e9f5761157dc200daa484d9c5ead6..7a3e376d04020e7a883f56591bc07d9970d15c9a 100644
--- a/test/parallel/test-crypto-authenticated.js
+++ b/test/parallel/test-crypto-authenticated.js
@@ -50,7 +50,9 @@ const errMessages = {

View file

@ -10,10 +10,10 @@ parameters.
This should be upstreamed.
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 6e1a55adbd0b01383f3e54e924864dfeb6a57f0b..25b02f9904127780c68db9b451a7dfcf02a6fc5e 100644
index d3a0dd7cedb0d239ae427d1af2335e155345a454..de0c39234bb4155c56b4e51e42a399df3c4b8f87 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -438,6 +438,22 @@ MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
@@ -439,6 +439,22 @@ MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
return maybe;
}
@ -37,10 +37,10 @@ index 6e1a55adbd0b01383f3e54e924864dfeb6a57f0b..25b02f9904127780c68db9b451a7dfcf
BuiltinLoader* loader = GetInstance();
std::vector<std::string> ids = loader->GetBuiltinIds();
diff --git a/src/node_builtins.h b/src/node_builtins.h
index 8228e57d27b2f883d87ec12274f2745628caa6e1..b07c34a6d247a050f4f307940c9e157fb14d6166 100644
index 8d9f7c409659a30747e5feeac6cfec4208791370..34a51c3e5a79154c3633143b352aa9e108497767 100644
--- a/src/node_builtins.h
+++ b/src/node_builtins.h
@@ -53,6 +53,11 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
@@ -50,6 +50,11 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
v8::Local<v8::Context> context,
const char* id,
Environment* optional_env);

View file

@ -18,7 +18,7 @@ index a7329d279bb07542d3f4027e0c8e2b035d493e5b..5cff70923b4ea7a4df918b2d3d1fbc71
/**
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
index 7cec4e9a3e3675ba75d66a44ed4e142d13ca1821..0c7aad193442a7e5cab62638441969a7d4983ef9 100644
index 646b12382f6ebd073fe5968f8c1c0f36dbc64eac..15415e0652864d059390bc7383e073c86f5d0c03 100644
--- a/lib/internal/modules/esm/resolve.js
+++ b/lib/internal/modules/esm/resolve.js
@@ -824,6 +824,8 @@ function parsePackageName(specifier, base) {

View file

@ -7,10 +7,10 @@ Subject: fix: expose tracing::Agent and use tracing::TracingController instead
This API is used by Electron to create Node's tracing controller.
diff --git a/src/api/environment.cc b/src/api/environment.cc
index 3e2e6a04ddd51e688f77e4f0f7db53b933cb2390..2e6f4a5c4b894a7425db110b3aadbe734f137327 100644
index a17495d93cd98f335f07d854cf8f405239164893..e0bacccd4514fcc9122f6b6e7a613141b2510157 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -490,6 +490,10 @@ MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env) {
@@ -501,6 +501,10 @@ MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env) {
return env->platform();
}

View file

@ -17,7 +17,7 @@ Upstreams:
- https://github.com/nodejs/node/pull/39136
diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc
index 81ba818a2dc7d31aa6cadfb3a3c547e10631ecf3..6d5fbe2ffa81f379f7899b29f4b26bfbf590bc4e 100644
index 2685f5ea0bea998094453a5a29d23b1aaae55667..0ad4ba47b50a87bcf9e31a73c20a3a51be4ab96e 100644
--- a/src/crypto/crypto_cipher.cc
+++ b/src/crypto/crypto_cipher.cc
@@ -27,7 +27,8 @@ using v8::Value;
@ -191,7 +191,7 @@ index dd69323b80076d7333b80453c9cc9ef5b680ce27..6431b768c83fa27b2287588e936f93ae
UNREACHABLE();
}
diff --git a/src/crypto/crypto_dsa.cc b/src/crypto/crypto_dsa.cc
index 862c091b05f5886479cedb8b95b756e4fd1547ee..c4cf3a59677ae9640e444f2649f89de3ab3c5c9e 100644
index 6839283fbf4ca7ee7dd586e749c80671ad965658..4e186abdf13613cbe576da5b7d547408c0ee9f93 100644
--- a/src/crypto/crypto_dsa.cc
+++ b/src/crypto/crypto_dsa.cc
@@ -40,7 +40,7 @@ namespace crypto {
@ -228,7 +228,7 @@ index 2f9e9aacb1e652202d72c69b46f8e76d6c5405a8..5f19c38a78e37d3e8d92bcc20ae1357f
THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime");
return Nothing<bool>();
diff --git a/src/crypto/crypto_rsa.cc b/src/crypto/crypto_rsa.cc
index 4eacb1f142b6e04d6db17ca267d1fb6814666a01..79ad930c8bea22cf1ca645373438cc2706777c12 100644
index 47a42246eddfc795b735f5efd08edf2832bbf6c1..7e6afaa1d3a4612fd567924b40438a318ac93bac 100644
--- a/src/crypto/crypto_rsa.cc
+++ b/src/crypto/crypto_rsa.cc
@@ -610,10 +610,11 @@ Maybe<bool> GetRsaKeyDetail(
@ -309,7 +309,7 @@ index 28eb1bd6b7dc839fa6aefebe5813343c8e9444bb..1fe573cd7b6894743a0986e87802960a
} // namespace
diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h
index 716b40be50cdc2ebbd249e5a9d562385169f77ad..43247cf3d70b78a1e332d55336c2a5175a155e93 100644
index fd014e703454dd1988e9b5a013b937881c1f514a..0adbe57d582eff906476330083258716e5bcae99 100644
--- a/src/crypto/crypto_util.h
+++ b/src/crypto/crypto_util.h
@@ -15,6 +15,7 @@
@ -321,10 +321,10 @@ index 716b40be50cdc2ebbd249e5a9d562385169f77ad..43247cf3d70b78a1e332d55336c2a517
#include <openssl/rsa.h>
#include <openssl/dsa.h>
diff --git a/src/node_metadata.cc b/src/node_metadata.cc
index d4c8ccde21d3973f3099ee3075dc3c11d55cb514..d57435a73e17c21dad2a7c8fb2c6e8a356630d88 100644
index ed28871c385532b13e102200ba549bb7d7e901e6..c69d3f1867cd1b86194b109351643d9520c661e7 100644
--- a/src/node_metadata.cc
+++ b/src/node_metadata.cc
@@ -10,7 +10,7 @@
@@ -13,7 +13,7 @@
#include "v8.h"
#include "zlib.h"
@ -334,7 +334,7 @@ index d4c8ccde21d3973f3099ee3075dc3c11d55cb514..d57435a73e17c21dad2a7c8fb2c6e8a3
#if NODE_OPENSSL_HAS_QUIC
#include <openssl/quic.h>
diff --git a/src/node_metadata.h b/src/node_metadata.h
index 89c2d36611ee7bca78fc0c818e720188d0cbd6fc..a40121abd28ae7c51f91eabae39db947ab0b12d5 100644
index 2a924141d6edbaade371dd29d553eb1107ff5f75..be37169bb1d5e70e11601ccf00db0552ee3511ed 100644
--- a/src/node_metadata.h
+++ b/src/node_metadata.h
@@ -6,7 +6,7 @@
@ -347,7 +347,7 @@ index 89c2d36611ee7bca78fc0c818e720188d0cbd6fc..a40121abd28ae7c51f91eabae39db947
#if NODE_OPENSSL_HAS_QUIC
#include <openssl/quic.h>
diff --git a/src/node_options.cc b/src/node_options.cc
index 633c574c8199c1f57b6e55b732ea6f3792bf9317..d0af2849045fbe0287836dffe5c5d0083f35557d 100644
index def333cfddef800fefb4244d7fad6e489a5dafed..99f5274aec7512956a5e13a5ca9c0b593a57cc7a 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -5,7 +5,7 @@
@ -360,7 +360,7 @@ index 633c574c8199c1f57b6e55b732ea6f3792bf9317..d0af2849045fbe0287836dffe5c5d008
#endif
diff --git a/src/node_options.h b/src/node_options.h
index 6c9c929399f336dda2da4fe095d69c8f87970103..431536297e1a18b65f3c7a10883a736abcebe84d 100644
index 2e4da9decf3b4b05b89a586cda194a475e0cd41d..8fabd68975721ed27fd99ff50dbbfcb3158336e7 100644
--- a/src/node_options.h
+++ b/src/node_options.h
@@ -11,7 +11,7 @@

View file

@ -37,7 +37,7 @@ index 3a3228ddc9eb6b53efc0721466479a9f62cd8967..175a67840348ca507d6e8b29835e5ab3
HistogramBase::kInternalFieldCount);
SetProtoMethodNoSideEffect(isolate, tmpl, "count", GetCount);
diff --git a/src/node_messaging.cc b/src/node_messaging.cc
index 009ac0056c5486a3f94889f70b592e26827d86a0..ba497064de834c4ea565bb267d1e95e4647b79eb 100644
index d1296fe20c290bd137cb0aa0c077d1672c18c7a1..1c0f54286f9269efa436ba0fbc730766224891c0 100644
--- a/src/node_messaging.cc
+++ b/src/node_messaging.cc
@@ -1495,13 +1495,16 @@ static void InitMessaging(Local<Object> target,

View file

@ -7,7 +7,7 @@ Wc++98-compat-extra-semi is turned on for Electron so this
patch fixes that error in node.
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
index 97917c91c06dc47dfa6be2c194944cdc93e6bd7f..177390a24eb6490b128e22c104014e80f338c9d9 100644
index 1cdd436b343861a96582a803b460aefe1e81cdd0..0249574c4431fb5b98852699f1368f71b49691c1 100644
--- a/src/node_serdes.cc
+++ b/src/node_serdes.cc
@@ -32,7 +32,7 @@ namespace serdes {

View file

@ -6,7 +6,7 @@ Subject: Pass all globals through "require"
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 33bc7f28a41c6c40face8f493d07d3c0061608a7..eb73c774118653c0746f78d4b72b31cb7c4f41f2 100644
index b942b37dd90498432728bf897fb6f694b7041ba5..9da60135ac79a2034a646c0a1380923f7fbfacab 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -137,6 +137,13 @@ const {
@ -23,7 +23,7 @@ index 33bc7f28a41c6c40face8f493d07d3c0061608a7..eb73c774118653c0746f78d4b72b31cb
const {
isProxy
} = require('internal/util/types');
@@ -1213,10 +1220,12 @@ Module.prototype._compile = function(content, filename) {
@@ -1221,10 +1228,12 @@ Module.prototype._compile = function(content, filename) {
if (requireDepth === 0) statCache = new SafeMap();
if (inspectorWrapper) {
result = inspectorWrapper(compiledWrapper, thisValue, exports,

View file

@ -7,10 +7,10 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were
a real filesystem.
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index cbca692e0ef458aad9beea30d04e1152e1fed5e5..9cf2c2d71208ad960f54965ddefa98bea51bfa6a 100644
index 81b441a554e34556fc41066fc8761c713acb0ced..7dd89d5f134b09da2678dd54fa9139466fea179c 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -104,6 +104,10 @@ process.domain = null;
@@ -101,6 +101,10 @@ process.domain = null;
}
process._exiting = false;
@ -22,7 +22,7 @@ index cbca692e0ef458aad9beea30d04e1152e1fed5e5..9cf2c2d71208ad960f54965ddefa98be
// release cycle, remove the Proxy and setter and update the
// getter to either return a read-only object or always return
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index eb73c774118653c0746f78d4b72b31cb7c4f41f2..44e4c22ebf39fc9c52f789173a2cc50300bcd181 100644
index 9da60135ac79a2034a646c0a1380923f7fbfacab..207142322bba89e94f4e3052a22bef6ffebcdc39 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -94,7 +94,7 @@ const fs = require('fs');

View file

@ -7,7 +7,7 @@ This refactors several allocators to allocate within the V8 memory cage,
allowing them to be compatible with the V8_SANDBOXED_POINTERS feature.
diff --git a/src/api/environment.cc b/src/api/environment.cc
index 2e6f4a5c4b894a7425db110b3aadbe734f137327..c0c422e969543dcd570dabfd8ff0755abe37face 100644
index e0bacccd4514fcc9122f6b6e7a613141b2510157..e3c42d892eed8dd605301348c08ad24f4362a7aa 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -86,6 +86,14 @@ MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context,
@ -105,7 +105,7 @@ index 1fe573cd7b6894743a0986e87802960ad09e2dd9..ff1346f65f3c280da9962df87eb0710a
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
#ifndef OPENSSL_IS_BORINGSSL
diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h
index 43247cf3d70b78a1e332d55336c2a5175a155e93..b9066b4b0fb9a529c4cbf774e5aacfd8a7aa99c8 100644
index 0adbe57d582eff906476330083258716e5bcae99..e2fb3e67900cc1dd0e77b81dd9fad225ea0ac272 100644
--- a/src/crypto/crypto_util.h
+++ b/src/crypto/crypto_util.h
@@ -280,7 +280,7 @@ class ByteSource {
@ -118,7 +118,7 @@ index 43247cf3d70b78a1e332d55336c2a5175a155e93..b9066b4b0fb9a529c4cbf774e5aacfd8
v8::Local<v8::ArrayBuffer> ToArrayBuffer(Environment* env);
diff --git a/src/node_i18n.cc b/src/node_i18n.cc
index 808f1fa8d77718e0d44033203485fb2c2796d8e1..56ea735e74fe6d4296d3b179ccb9792daac568b5 100644
index d5d8943f1c66159ad8f345d8909275137b097ec2..21a99269711035b02efabe87309a62c27e3d8cb0 100644
--- a/src/node_i18n.cc
+++ b/src/node_i18n.cc
@@ -104,7 +104,7 @@ namespace {
@ -131,7 +131,7 @@ index 808f1fa8d77718e0d44033203485fb2c2796d8e1..56ea735e74fe6d4296d3b179ccb9792d
return ret;
diff --git a/src/node_internals.h b/src/node_internals.h
index efbdbeabf5a6afb658cbdc7888f94952e55f4f71..8b37639361e8902d7e1481071d3ec24be30339e0 100644
index ece9a4cfd45bf885169fdd278e09c467c6b4bbab..0c0dac67c0834ab7feba4260796292456a24c08d 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -99,7 +99,9 @@ v8::Maybe<bool> InitializePrimordials(v8::Local<v8::Context> context);
@ -155,7 +155,7 @@ index efbdbeabf5a6afb658cbdc7888f94952e55f4f71..8b37639361e8902d7e1481071d3ec24b
// Delegate to V8's allocator for compatibility with the V8 memory cage.
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
index 45a16d9de43703c2115dde85c9faae3a04be2a88..97917c91c06dc47dfa6be2c194944cdc93e6bd7f 100644
index 6864f2d88b34abfa4090780d6993684cd0b366a3..1cdd436b343861a96582a803b460aefe1e81cdd0 100644
--- a/src/node_serdes.cc
+++ b/src/node_serdes.cc
@@ -29,6 +29,11 @@ using v8::ValueSerializer;
@ -238,12 +238,12 @@ index 45a16d9de43703c2115dde85c9faae3a04be2a88..97917c91c06dc47dfa6be2c194944cdc
if (!buf.IsEmpty()) {
args.GetReturnValue().Set(buf.ToLocalChecked());
diff --git a/test/parallel/test-v8-serialize-leak.js b/test/parallel/test-v8-serialize-leak.js
index a90c398adcdaf30491a0fecdcf00895038d62e69..f5b8a1430ad2033eae06ca0157af2fb51d3f36a5 100644
index 696dbfea65ba95b1157cb6f469762d4a6e196199..b342ec59100809187689d0770a462b0b99e75e58 100644
--- a/test/parallel/test-v8-serialize-leak.js
+++ b/test/parallel/test-v8-serialize-leak.js
@@ -23,5 +23,5 @@ const after = process.memoryUsage.rss();
if (process.config.variables.asan) {
assert(after < before * 10, `asan: before=${before} after=${after}`);
@@ -25,5 +25,5 @@ if (process.config.variables.asan) {
} else if (process.config.variables.node_builtin_modules_path) {
assert(after < before * 4, `node_builtin_modules_path: before=${before} after=${after}`);
} else {
- assert(after < before * 2, `before=${before} after=${after}`);
+ assert(after < before * 3, `before=${before} after=${after}`);

View file

@ -35,6 +35,6 @@
// Allows to explicitly register builtin modules instead of using
// __attribute__((constructor)).
#define NODE_LINKED_MODULE_CONTEXT_AWARE(modname, regfunc) \
NODE_MODULE_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_LINKED)
NODE_BINDING_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_LINKED)
#endif // ELECTRON_SHELL_COMMON_NODE_INCLUDES_H_