chore: bump node to v22.18.0 (37-x-y) (#47935)

chore: bump node to v22.18.0

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] 2025-08-08 10:55:00 +02:00 committed by GitHub
commit a954f9f245
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 182 additions and 364 deletions

2
DEPS
View file

@ -4,7 +4,7 @@ vars = {
'chromium_version': 'chromium_version':
'138.0.7204.224', '138.0.7204.224',
'node_version': 'node_version':
'v22.17.1', 'v22.18.0',
'nan_version': 'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213', 'e14bdcd1f72d62bca1d541b66da43130384ec213',
'squirrel.mac_version': 'squirrel.mac_version':

View file

@ -742,7 +742,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
} }
const dirent = getDirent(currentPath, result[0][i], type); const dirent = getDirent(currentPath, result[0][i], type);
const stat = internalBinding('fs').internalModuleStat(binding, resultPath); const stat = internalBinding('fs').internalModuleStat(resultPath);
context.readdirResults.push(dirent); context.readdirResults.push(dirent);
if (dirent.isDirectory() || stat === 1) { if (dirent.isDirectory() || stat === 1) {
@ -755,7 +755,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
for (let i = 0; i < result.length; i++) { for (let i = 0; i < result.length; i++) {
const resultPath = path.join(currentPath, result[i]); const resultPath = path.join(currentPath, result[i]);
const relativeResultPath = path.relative(context.basePath, resultPath); const relativeResultPath = path.relative(context.basePath, resultPath);
const stat = internalBinding('fs').internalModuleStat(binding, resultPath); const stat = internalBinding('fs').internalModuleStat(resultPath);
context.readdirResults.push(relativeResultPath); context.readdirResults.push(relativeResultPath);
if (stat === 1) { if (stat === 1) {
@ -825,7 +825,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
if (context.withFileTypes) { if (context.withFileTypes) {
readdirResult = [ readdirResult = [
[...readdirResult], readdirResult.map((p: string) => { [...readdirResult], readdirResult.map((p: string) => {
return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p)); return internalBinding('fs').internalModuleStat(path.join(pathArg, p));
}) })
]; ];
} }
@ -1010,9 +1010,9 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
}); });
const { internalModuleStat } = binding; const { internalModuleStat } = binding;
internalBinding('fs').internalModuleStat = (receiver: unknown, pathArgument: string) => { internalBinding('fs').internalModuleStat = (pathArgument: string) => {
const pathInfo = splitPath(pathArgument); const pathInfo = splitPath(pathArgument);
if (!pathInfo.isAsar) return internalModuleStat(receiver, pathArgument); if (!pathInfo.isAsar) return internalModuleStat(pathArgument);
const { asarPath, filePath } = pathInfo; const { asarPath, filePath } = pathInfo;
// -ENOENT // -ENOENT
@ -1047,7 +1047,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
if (withFileTypes) { if (withFileTypes) {
initialItem = [ initialItem = [
[...initialItem], initialItem.map((p: string) => { [...initialItem], initialItem.map((p: string) => {
return internalBinding('fs').internalModuleStat(binding, path.join(originalPath, p)); return internalBinding('fs').internalModuleStat(path.join(originalPath, p));
}) })
]; ];
} }
@ -1080,7 +1080,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
readdirResult = [ readdirResult = [
[...files], files.map((p: string) => { [...files], files.map((p: string) => {
return internalBinding('fs').internalModuleStat(binding, path.join(direntPath, p)); return internalBinding('fs').internalModuleStat(path.join(direntPath, p));
}) })
]; ];
} else { } else {
@ -1101,7 +1101,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
const { 0: pathArg, 1: readDir } = queue.pop(); const { 0: pathArg, 1: readDir } = queue.pop();
for (const ent of readDir) { for (const ent of readDir) {
const direntPath = path.join(pathArg, ent); const direntPath = path.join(pathArg, ent);
const stat = internalBinding('fs').internalModuleStat(binding, direntPath); const stat = internalBinding('fs').internalModuleStat(direntPath);
result.push(path.relative(originalPath, direntPath)); result.push(path.relative(originalPath, direntPath));
if (stat === 1) { if (stat === 1) {
@ -1155,7 +1155,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
if (context.withFileTypes) { if (context.withFileTypes) {
readdirResult = [ readdirResult = [
[...readdirResult], readdirResult.map((p: string) => { [...readdirResult], readdirResult.map((p: string) => {
return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p)); return internalBinding('fs').internalModuleStat(path.join(pathArg, p));
}) })
]; ];
} }

View file

@ -37,7 +37,6 @@ test_use_static_method_names_in_call_stacks.patch
fix_remove_fastapitypedarray_usage.patch fix_remove_fastapitypedarray_usage.patch
test_handle_explicit_resource_management_globals.patch test_handle_explicit_resource_management_globals.patch
build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch
build_option_to_use_custom_inspector_protocol_path.patch
fix_adjust_wpt_and_webidl_tests_for_enabled_float16array.patch fix_adjust_wpt_and_webidl_tests_for_enabled_float16array.patch
chore_add_createexternalizabletwobytestring_to_globals.patch chore_add_createexternalizabletwobytestring_to_globals.patch
refactor_attach_cppgc_heap_on_v8_isolate_creation.patch refactor_attach_cppgc_heap_on_v8_isolate_creation.patch
@ -46,5 +45,3 @@ cli_move_--trace-atomics-wait_to_eol.patch
fix_cppgc_initializing_twice.patch fix_cppgc_initializing_twice.patch
fix_task_starvation_in_inspector_context_test.patch fix_task_starvation_in_inspector_context_test.patch
fix_expose_readfilesync_override_for_modules.patch fix_expose_readfilesync_override_for_modules.patch
chore_remove_protocol_maybe_from_node_string.patch
fix_-wmismatched-new-delete_in_debug_utils_cc.patch

View file

@ -11,7 +11,7 @@ really in 20/21. We have to wait until 22 is released to be able to
build with upstream GN files. build with upstream GN files.
diff --git a/configure.py b/configure.py diff --git a/configure.py b/configure.py
index 4560bac7b8e3c707ecea5a425f642efb9de9ed36..e9c2a4391f4058a21a259cacaac4fde5d199288e 100755 index 2415940835036226799a7ea14c6687cc0d56c523..0feb07afbccad97a92cee00954443407eb20ac67 100755
--- a/configure.py --- a/configure.py
+++ b/configure.py +++ b/configure.py
@@ -1722,7 +1722,7 @@ def configure_v8(o, configs): @@ -1722,7 +1722,7 @@ def configure_v8(o, configs):
@ -24,7 +24,7 @@ index 4560bac7b8e3c707ecea5a425f642efb9de9ed36..e9c2a4391f4058a21a259cacaac4fde5
o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_external_code_space'] = 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_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
diff --git a/node.gni b/node.gni diff --git a/node.gni b/node.gni
index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4f239b669 100644 index b049f0692980c3e26771c3209c3bdd2e9a4d637b..e2407027ab05e59b2f0f1c213b98ea469db7a91b 100644
--- a/node.gni --- a/node.gni
+++ b/node.gni +++ b/node.gni
@@ -5,10 +5,10 @@ @@ -5,10 +5,10 @@
@ -40,7 +40,7 @@ index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4
# The location of OpenSSL - use the one from node's deps by default. # The location of OpenSSL - use the one from node's deps by default.
node_openssl_path = "$node_path/deps/openssl" node_openssl_path = "$node_path/deps/openssl"
@@ -39,12 +39,15 @@ declare_args() { @@ -42,12 +42,15 @@ declare_args() {
# The variable is called "openssl" for parity with node's GYP build. # The variable is called "openssl" for parity with node's GYP build.
node_use_openssl = true node_use_openssl = true
@ -57,7 +57,7 @@ index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4
# Custom build tag. # Custom build tag.
node_tag = "" node_tag = ""
@@ -64,10 +67,16 @@ declare_args() { @@ -67,10 +70,16 @@ declare_args() {
# TODO(zcbenz): There are few broken things for now: # TODO(zcbenz): There are few broken things for now:
# 1. cross-os compilation is not supported. # 1. cross-os compilation is not supported.
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64. # 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
@ -76,10 +76,10 @@ index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4
assert(!node_enable_inspector || node_use_openssl, assert(!node_enable_inspector || node_use_openssl,
diff --git a/src/node_builtins.cc b/src/node_builtins.cc diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 092341dbfbabe15b15ed43057d399f754505f6fd..f14b45850e42585f5686b7201e2b8281ed8c24e1 100644 index abf1583cdac9f139056cf4809f14e28e62f6d24c..8b104e175ccf8de90c138337f83f8f6ce1348ac7 100644
--- a/src/node_builtins.cc --- a/src/node_builtins.cc
+++ b/src/node_builtins.cc +++ b/src/node_builtins.cc
@@ -788,6 +788,7 @@ void BuiltinLoader::RegisterExternalReferences( @@ -789,6 +789,7 @@ void BuiltinLoader::RegisterExternalReferences(
registry->Register(GetNatives); registry->Register(GetNatives);
RegisterExternalReferencesForInternalizedBuiltinCode(registry); RegisterExternalReferencesForInternalizedBuiltinCode(registry);
@ -279,7 +279,7 @@ index 856878c33681a73d41016729dabe48b0a6a80589..91a11852d206b65485fe90fd037a0bd1
if sys.platform == 'win32': if sys.platform == 'win32':
files = [ x.replace('\\', '/') for x in files ] files = [ x.replace('\\', '/') for x in files ]
diff --git a/unofficial.gni b/unofficial.gni diff --git a/unofficial.gni b/unofficial.gni
index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3c1c8bd1b 100644 index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f5294aab9d37 100644
--- a/unofficial.gni --- a/unofficial.gni
+++ b/unofficial.gni +++ b/unofficial.gni
@@ -22,6 +22,11 @@ template("node_gn_build") { @@ -22,6 +22,11 @@ template("node_gn_build") {
@ -354,8 +354,8 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3
+ } + }
if (node_enable_inspector) { if (node_enable_inspector) {
deps += [ deps += [
"src/inspector:crdtp", "$node_inspector_protocol_path:crdtp",
@@ -214,6 +232,10 @@ template("node_gn_build") { @@ -215,6 +233,10 @@ template("node_gn_build") {
} }
} }
@ -366,7 +366,7 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3
executable(target_name) { executable(target_name) {
forward_variables_from(invoker, "*") forward_variables_from(invoker, "*")
@@ -288,6 +310,7 @@ template("node_gn_build") { @@ -289,6 +311,7 @@ template("node_gn_build") {
} }
executable("node_js2c") { executable("node_js2c") {
@ -374,7 +374,7 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3
deps = [ deps = [
"deps/uv", "deps/uv",
"$node_simdutf_path", "$node_simdutf_path",
@@ -298,26 +321,75 @@ template("node_gn_build") { @@ -299,26 +322,75 @@ template("node_gn_build") {
"src/embedded_data.cc", "src/embedded_data.cc",
"src/embedded_data.h", "src/embedded_data.h",
] ]
@ -460,7 +460,7 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3
outputs = [ "$target_gen_dir/node_javascript.cc" ] outputs = [ "$target_gen_dir/node_javascript.cc" ]
# Get the path to node_js2c executable of the host toolchain. # Get the path to node_js2c executable of the host toolchain.
@@ -331,11 +403,11 @@ template("node_gn_build") { @@ -332,11 +404,11 @@ template("node_gn_build") {
get_label_info(":node_js2c($host_toolchain)", "name") + get_label_info(":node_js2c($host_toolchain)", "name") +
host_executable_suffix host_executable_suffix

View file

@ -14,7 +14,7 @@ We don't need to do this for zlib, as the existing gn workflow uses the same
Upstreamed at https://github.com/nodejs/node/pull/55903 Upstreamed at https://github.com/nodejs/node/pull/55903
diff --git a/unofficial.gni b/unofficial.gni diff --git a/unofficial.gni b/unofficial.gni
index a6cfd45b109c7b38fcf1529468ff64d3c1c8bd1b..332c9ee7262108ae9616e9bc8bd950a4940a858c 100644 index 26ebc811272ef2990f8d090c54e7f5294aab9d37..8886f2a79ae77614789d6ae0defd4f18fc756456 100644
--- a/unofficial.gni --- a/unofficial.gni
+++ b/unofficial.gni +++ b/unofficial.gni
@@ -160,7 +160,6 @@ template("node_gn_build") { @@ -160,7 +160,6 @@ template("node_gn_build") {
@ -44,7 +44,7 @@ index a6cfd45b109c7b38fcf1529468ff64d3c1c8bd1b..332c9ee7262108ae9616e9bc8bd950a4
if (v8_enable_i18n_support) { if (v8_enable_i18n_support) {
deps += [ "//third_party/icu" ] deps += [ "//third_party/icu" ]
} }
@@ -230,6 +239,19 @@ template("node_gn_build") { @@ -231,6 +240,19 @@ template("node_gn_build") {
sources += node_inspector.node_inspector_sources + sources += node_inspector.node_inspector_sources +
node_inspector.node_inspector_generated_sources node_inspector.node_inspector_generated_sources
} }

View file

@ -38,10 +38,10 @@ index 8521730bd03cdfce47e9b5d0f5d68a568bc3de8c..28f4598aa7ea0e93350f79566c06d0f0
} }
diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h
index 94ec9b2301998c4c5aad9ca3dae72ecf323fa0bb..a0d19a592d7bf9b00d6b98ef1ae931626ebb945c 100644 index bcdedaa2ae4ab1d3267d7a1347f15e0405261277..ddedca4a5b9b35258050f8b4cb446ceeba956896 100644
--- a/src/inspector/node_string.h --- a/src/inspector/node_string.h
+++ b/src/inspector/node_string.h +++ b/src/inspector/node_string.h
@@ -19,8 +19,8 @@ namespace crdtp { @@ -18,8 +18,8 @@ namespace crdtp {
template <> template <>
struct ProtocolTypeTraits<std::string> { struct ProtocolTypeTraits<std::string> {

View file

@ -10,10 +10,10 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version. This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.
diff --git a/common.gypi b/common.gypi diff --git a/common.gypi b/common.gypi
index acfc02510ee1ce34a3f410a7a4ce53adb42abd35..b9264bfb1170928431848bb2b99e4f0dfbe8f95a 100644 index 679633dc6b4ce2a1f5f88e93d1a1c1feb4bbadb4..2caa183213d5632be81b763e894e37c09384391f 100644
--- a/common.gypi --- a/common.gypi
+++ b/common.gypi +++ b/common.gypi
@@ -538,7 +538,7 @@ @@ -539,7 +539,7 @@
'-fno-rtti', '-fno-rtti',
'-fno-exceptions', '-fno-exceptions',
'-fno-strict-aliasing', '-fno-strict-aliasing',
@ -22,7 +22,7 @@ index acfc02510ee1ce34a3f410a7a4ce53adb42abd35..b9264bfb1170928431848bb2b99e4f0d
], ],
'defines': [ '__STDC_FORMAT_MACROS' ], 'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ], 'ldflags': [ '-rdynamic' ],
@@ -708,7 +708,7 @@ @@ -709,7 +709,7 @@
['clang==1', { ['clang==1', {
'xcode_settings': { 'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',

View file

@ -64,10 +64,10 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327
module.exports = { module.exports = {
diff --git a/node.gyp b/node.gyp diff --git a/node.gyp b/node.gyp
index 0434887c363a586cbfa0438765fc8800d4237057..20fbf03cee24e66f9ad0d394dbcfa3ad03348890 100644 index 442c1e7a6ddafbb7a7ec7a42a97ec04b28ea4d93..3a66c11d39dd2fd129c8f54098a9607e080ecca0 100644
--- a/node.gyp --- a/node.gyp
+++ b/node.gyp +++ b/node.gyp
@@ -175,7 +175,6 @@ @@ -176,7 +176,6 @@
'src/timers.cc', 'src/timers.cc',
'src/timer_wrap.cc', 'src/timer_wrap.cc',
'src/tracing/agent.cc', 'src/tracing/agent.cc',
@ -75,7 +75,7 @@ index 0434887c363a586cbfa0438765fc8800d4237057..20fbf03cee24e66f9ad0d394dbcfa3ad
'src/tracing/node_trace_writer.cc', 'src/tracing/node_trace_writer.cc',
'src/tracing/trace_event.cc', 'src/tracing/trace_event.cc',
'src/tracing/traced_value.cc', 'src/tracing/traced_value.cc',
@@ -302,7 +301,6 @@ @@ -304,7 +303,6 @@
'src/tcp_wrap.h', 'src/tcp_wrap.h',
'src/timers.h', 'src/timers.h',
'src/tracing/agent.h', 'src/tracing/agent.h',

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. This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
diff --git a/common.gypi b/common.gypi diff --git a/common.gypi b/common.gypi
index cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53adb42abd35 100644 index 33af43cd768c24b26d523f3db66eb8b9eb26859a..679633dc6b4ce2a1f5f88e93d1a1c1feb4bbadb4 100644
--- a/common.gypi --- a/common.gypi
+++ b/common.gypi +++ b/common.gypi
@@ -89,6 +89,8 @@ @@ -89,6 +89,8 @@
@ -19,7 +19,7 @@ index cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53ad
##### end V8 defaults ##### ##### end V8 defaults #####
# When building native modules using 'npm install' with the system npm, # When building native modules using 'npm install' with the system npm,
@@ -297,7 +299,8 @@ @@ -298,7 +300,8 @@
'_GLIBCXX_USE_CXX11_ABI=1', '_GLIBCXX_USE_CXX11_ABI=1',
# This help forks when building Node.js on a 32-bit arch as # This help forks when building Node.js on a 32-bit arch as
# libuv is always compiled with _FILE_OFFSET_BITS=64 # libuv is always compiled with _FILE_OFFSET_BITS=64
@ -29,7 +29,7 @@ index cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53ad
], ],
# Forcibly disable -Werror. We support a wide range of compilers, it's # Forcibly disable -Werror. We support a wide range of compilers, it's
@@ -454,6 +457,11 @@ @@ -455,6 +458,11 @@
}], }],
], ],
}], }],
@ -42,7 +42,7 @@ index cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53ad
# list in v8/BUILD.gn. # list in v8/BUILD.gn.
['v8_enable_v8_checks == 1', { ['v8_enable_v8_checks == 1', {
diff --git a/configure.py b/configure.py diff --git a/configure.py b/configure.py
index e9c2a4391f4058a21a259cacaac4fde5d199288e..7821a0d3a7179a9e7fa9e48a062c2b0e7705ca6f 100755 index 0feb07afbccad97a92cee00954443407eb20ac67..5eccced7cf0212f229db68c76cc824a37e4a29bc 100755
--- a/configure.py --- a/configure.py
+++ b/configure.py +++ b/configure.py
@@ -1704,6 +1704,7 @@ def configure_library(lib, output, pkgname=None): @@ -1704,6 +1704,7 @@ def configure_library(lib, output, pkgname=None):

View file

@ -10,10 +10,10 @@ JS errors and ensures embedder JS is loaded via LoadEmbedderJavaScriptSource.
That method is generated by our modifications to js2c.cc in the BUILD.gn patch That method is generated by our modifications to js2c.cc in the BUILD.gn patch
diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
index 411eab8136d5957ae8a491bc38ffbdc88e59f5da..63c93b5be09692d0d4b6bfbb214b173b50ccca43 100644 index 0244a214b187e67e0cb89f26cd019855963ec93a..b65a3be6bcb0e28f7f43367d0fa9da533db9d0d1 100644
--- a/lib/internal/fs/watchers.js --- a/lib/internal/fs/watchers.js
+++ b/lib/internal/fs/watchers.js +++ b/lib/internal/fs/watchers.js
@@ -292,12 +292,13 @@ function emitCloseNT(self) { @@ -299,12 +299,13 @@ function emitCloseNT(self) {
} }
// Legacy alias on the C++ wrapper object. This is not public API, so we may // Legacy alias on the C++ wrapper object. This is not public API, so we may
@ -34,7 +34,7 @@ index 411eab8136d5957ae8a491bc38ffbdc88e59f5da..63c93b5be09692d0d4b6bfbb214b173b
let kResistStopPropagation; let kResistStopPropagation;
diff --git a/src/node_builtins.cc b/src/node_builtins.cc diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index f14b45850e42585f5686b7201e2b8281ed8c24e1..915b8cba6d512096e6090272ab3fbc63d5c61ce8 100644 index 8b104e175ccf8de90c138337f83f8f6ce1348ac7..35cf42a5e533cb799bf129df0c8370bfe8310233 100644
--- a/src/node_builtins.cc --- a/src/node_builtins.cc
+++ b/src/node_builtins.cc +++ b/src/node_builtins.cc
@@ -35,6 +35,7 @@ using v8::Value; @@ -35,6 +35,7 @@ using v8::Value;

View file

@ -1,60 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Mon, 17 Feb 2025 20:57:05 +0900
Subject: build: option to use custom inspector_protocol path
This allows building against //third_party/inspector_protocol
which would align us when building with chromium shared dependencies.
The span changes will be auto-removed when Node.js bumps their
protocol deps to contain https://chromium-review.googlesource.com/c/v8/v8/+/5996636
Rest of the changes can be upstreamed.
diff --git a/node.gni b/node.gni
index 165b26a79a7f2b74d2a2252dc2350b2e10c091e6..c64761b730e61edcdc0e46a48699f2fd5bb1c0a6 100644
--- a/node.gni
+++ b/node.gni
@@ -16,6 +16,9 @@ declare_args() {
# The location of simdutf - use the one from node's deps by default.
node_simdutf_path = "//third_party/simdutf"
+ # The location of inspector_protocol - use the one from node's deps by default.
+ node_inspector_protocol_path = "//third_party/inspector_protocol"
+
# The NODE_MODULE_VERSION defined in node_version.h.
node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")
diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni
index 3d7aa148678b2646b88fa7c32abec91791b02b82..4810d93eb971b253f7dadff7011a632f6dbe6a2b 100644
--- a/src/inspector/unofficial.gni
+++ b/src/inspector/unofficial.gni
@@ -13,7 +13,7 @@ template("inspector_gn_build") {
}
node_gen_dir = get_label_info("../..", "target_gen_dir")
- protocol_tool_path = "../../deps/inspector_protocol"
+ protocol_tool_path = "$node_inspector_protocol_path"
gypi_values = exec_script(
"../../tools/gypi_to_gn.py",
diff --git a/unofficial.gni b/unofficial.gni
index 332c9ee7262108ae9616e9bc8bd950a4940a858c..8886f2a79ae77614789d6ae0defd4f18fc756456 100644
--- a/unofficial.gni
+++ b/unofficial.gni
@@ -222,13 +222,14 @@ template("node_gn_build") {
}
if (node_enable_inspector) {
deps += [
- "src/inspector:crdtp",
+ "$node_inspector_protocol_path:crdtp",
"src/inspector:node_protocol_generated_sources",
"src/inspector:v8_inspector_compress_protocol_json",
]
include_dirs = [
"$target_gen_dir/src",
"$target_gen_dir/src/inspector",
+ "$node_inspector_protocol_path",
]
node_inspector = exec_script(
"./tools/gypi_to_gn.py",

View file

@ -11,7 +11,7 @@ node-gyp will use the result of `process.config` that reflects the environment
in which the binary got built. in which the binary got built.
diff --git a/common.gypi b/common.gypi diff --git a/common.gypi b/common.gypi
index b9264bfb1170928431848bb2b99e4f0dfbe8f95a..836d96a1bd9c1d5568f0045bbddddca1edb1a0ce 100644 index 2caa183213d5632be81b763e894e37c09384391f..2cce436c4a9e3d942f957f6c94a4ef9e3db391ce 100644
--- a/common.gypi --- a/common.gypi
+++ b/common.gypi +++ b/common.gypi
@@ -128,6 +128,7 @@ @@ -128,6 +128,7 @@

View file

@ -8,7 +8,7 @@ they use themselves as the entry point. We should try to upstream some form
of this. of this.
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
index 4e7be0594ca1e1ceaf1963debbce46783893ed77..a6df0672bf6ae6e9a74ebbb0e4debff63599cc99 100644 index 0cda54fd85e1e0bff13d4718a269eb3e7c60312a..6b165062a5eaa40f6e5614bca50bc33ccbdb85cc 100644
--- a/lib/internal/process/pre_execution.js --- a/lib/internal/process/pre_execution.js
+++ b/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js
@@ -245,12 +245,14 @@ function patchProcessObject(expandArgv1) { @@ -245,12 +245,14 @@ function patchProcessObject(expandArgv1) {

View file

@ -11,10 +11,10 @@ Without this patch, building with simdjson fails with
This patch can be removed once this is fixed upstream in simdjson. This patch can be removed once this is fixed upstream in simdjson.
diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h
index a0d449975224a3e0db5c05de79b290763d6e390c..e77e47f972b4609e38aa8b68ab0d81ed1575effb 100644 index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d844f15f42 100644
--- a/deps/simdjson/simdjson.h --- a/deps/simdjson/simdjson.h
+++ b/deps/simdjson/simdjson.h +++ b/deps/simdjson/simdjson.h
@@ -3868,12 +3868,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string @@ -3899,12 +3899,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
} // namespace simdjson } // namespace simdjson
@ -32,7 +32,7 @@ index a0d449975224a3e0db5c05de79b290763d6e390c..e77e47f972b4609e38aa8b68ab0d81ed
namespace simdjson { namespace simdjson {
namespace internal { namespace internal {
@@ -4273,6 +4278,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen @@ -4304,6 +4309,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
} // namespace simdjson } // namespace simdjson
@ -42,7 +42,7 @@ index a0d449975224a3e0db5c05de79b290763d6e390c..e77e47f972b4609e38aa8b68ab0d81ed
inline simdjson::padded_string operator ""_padded(const char *str, size_t len) { inline simdjson::padded_string operator ""_padded(const char *str, size_t len) {
return simdjson::padded_string(str, len); return simdjson::padded_string(str, len);
} }
@@ -4281,6 +4289,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len @@ -4312,6 +4320,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len
return simdjson::padded_string(reinterpret_cast<const char8_t *>(str), len); return simdjson::padded_string(reinterpret_cast<const char8_t *>(str), len);
} }
#endif #endif

View file

@ -11,7 +11,7 @@ its own blended handler between Node and Blink.
Not upstreamable. Not upstreamable.
diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js
index 9d6f850f667c5186efe6855bc3d5f5af332bdaa7..8521759e20adf53024e5893dbf3cb36e1752085e 100644 index 9b41db8b0714b7408f79cbd5b4c460d9bc08f239..35ecfb9bbaf2c8e7351e1c69da84c82a4a7cb049 100644
--- a/lib/internal/modules/esm/utils.js --- a/lib/internal/modules/esm/utils.js
+++ b/lib/internal/modules/esm/utils.js +++ b/lib/internal/modules/esm/utils.js
@@ -30,7 +30,7 @@ const { @@ -30,7 +30,7 @@ const {
@ -23,7 +23,7 @@ index 9d6f850f667c5186efe6855bc3d5f5af332bdaa7..8521759e20adf53024e5893dbf3cb36e
const { const {
loadPreloadModules, loadPreloadModules,
initializeFrozenIntrinsics, initializeFrozenIntrinsics,
@@ -280,12 +280,13 @@ let _forceDefaultLoader = false; @@ -281,12 +281,13 @@ let _forceDefaultLoader = false;
* @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders. * @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders.
*/ */
function initializeESM(forceDefaultLoader = false) { function initializeESM(forceDefaultLoader = false) {
@ -40,10 +40,10 @@ index 9d6f850f667c5186efe6855bc3d5f5af332bdaa7..8521759e20adf53024e5893dbf3cb36e
/** /**
diff --git a/src/module_wrap.cc b/src/module_wrap.cc diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639ae7292d20 100644 index e317a84e55714af0a93719336d02ac26410ad724..e3880111172363feafb53b51deb08c93596cd4f4 100644
--- a/src/module_wrap.cc --- a/src/module_wrap.cc
+++ b/src/module_wrap.cc +++ b/src/module_wrap.cc
@@ -875,7 +875,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback( @@ -895,7 +895,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
return module->module_.Get(isolate); return module->module_.Get(isolate);
} }
@ -52,7 +52,7 @@ index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639a
Local<Context> context, Local<Context> context,
Local<Data> host_defined_options, Local<Data> host_defined_options,
Local<Value> resource_name, Local<Value> resource_name,
@@ -947,12 +947,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( @@ -967,12 +967,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
Realm* realm = Realm::GetCurrent(args); Realm* realm = Realm::GetCurrent(args);
HandleScope handle_scope(isolate); HandleScope handle_scope(isolate);
@ -68,7 +68,7 @@ index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639a
} }
void ModuleWrap::HostInitializeImportMetaObjectCallback( void ModuleWrap::HostInitializeImportMetaObjectCallback(
@@ -994,13 +995,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback( @@ -1014,13 +1015,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
Realm* realm = Realm::GetCurrent(args); Realm* realm = Realm::GetCurrent(args);
Isolate* isolate = realm->isolate(); Isolate* isolate = realm->isolate();
@ -87,7 +87,7 @@ index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639a
MaybeLocal<Value> ModuleWrap::SyntheticModuleEvaluationStepsCallback( MaybeLocal<Value> ModuleWrap::SyntheticModuleEvaluationStepsCallback(
diff --git a/src/module_wrap.h b/src/module_wrap.h diff --git a/src/module_wrap.h b/src/module_wrap.h
index ef4dfd1d6b091d2b0f71b946904a47415b6435ba..862f946a75f2a2949d7eeb7f97e96289beab8078 100644 index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3da51c22a 100644
--- a/src/module_wrap.h --- a/src/module_wrap.h
+++ b/src/module_wrap.h +++ b/src/module_wrap.h
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
@ -114,7 +114,7 @@ index ef4dfd1d6b091d2b0f71b946904a47415b6435ba..862f946a75f2a2949d7eeb7f97e96289
public: public:
enum InternalFields { enum InternalFields {
kModuleSlot = BaseObject::kInternalFieldCount, kModuleSlot = BaseObject::kInternalFieldCount,
@@ -91,6 +99,8 @@ class ModuleWrap : public BaseObject { @@ -92,6 +100,8 @@ class ModuleWrap : public BaseObject {
static void CreateRequiredModuleFacade( static void CreateRequiredModuleFacade(
const v8::FunctionCallbackInfo<v8::Value>& args); const v8::FunctionCallbackInfo<v8::Value>& args);
@ -123,7 +123,7 @@ index ef4dfd1d6b091d2b0f71b946904a47415b6435ba..862f946a75f2a2949d7eeb7f97e96289
private: private:
ModuleWrap(Realm* realm, ModuleWrap(Realm* realm,
v8::Local<v8::Object> object, v8::Local<v8::Object> object,
@@ -130,7 +140,6 @@ class ModuleWrap : public BaseObject { @@ -131,7 +141,6 @@ class ModuleWrap : public BaseObject {
v8::Local<v8::String> specifier, v8::Local<v8::String> specifier,
v8::Local<v8::FixedArray> import_attributes, v8::Local<v8::FixedArray> import_attributes,
v8::Local<v8::Module> referrer); v8::Local<v8::Module> referrer);

View file

@ -1,33 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Thu, 26 Jun 2025 09:20:43 +0000
Subject: chore: remove protocol::Maybe from node_string
It was removed upstream in https://chromium-review.googlesource.com/c/chromium/src/+/6049967.
This should be upstreamed.
diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h
index a0d19a592d7bf9b00d6b98ef1ae931626ebb945c..ddedca4a5b9b35258050f8b4cb446ceeba956896 100644
--- a/src/inspector/node_string.h
+++ b/src/inspector/node_string.h
@@ -6,7 +6,6 @@
#include <cstring>
#include <sstream>
#include <string>
-#include "crdtp/maybe.h"
#include "crdtp/protocol_core.h"
#include "util.h"
#include "v8-inspector.h"
@@ -31,11 +30,6 @@ struct ProtocolTypeTraits<node::inspector::protocol::Binary> {
std::vector<uint8_t>* bytes);
};
-template <>
-struct detail::MaybeTypedef<node::inspector::protocol::Binary> {
- typedef ValueMaybe<node::inspector::protocol::Binary> type;
-};
-
} // namespace crdtp
namespace node {

View file

@ -15,10 +15,50 @@ Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
diff --git a/doc/api/cli.md b/doc/api/cli.md diff --git a/doc/api/cli.md b/doc/api/cli.md
index d924287df3ca29681cf71e2fbd402314ce8edd97..f2f4d25a838b9758234cd667b0fb537d0d0fcced 100644 index 404e87e6d1237b5ee79cafd8a959c1b6d9d23fe5..7deda572c940f7b2e8c6813f1826796a13e4db38 100644
--- a/doc/api/cli.md --- a/doc/api/cli.md
+++ b/doc/api/cli.md +++ b/doc/api/cli.md
@@ -3386,7 +3386,6 @@ one is included in the list below. @@ -2709,39 +2709,6 @@ added: v12.0.0
Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.3'. Use to disable support
for TLSv1.2, which is not as secure as TLSv1.3.
-### `--trace-atomics-wait`
-
-<!-- YAML
-added: v14.3.0
-deprecated:
- - v18.8.0
- - v16.18.0
--->
-
-> Stability: 0 - Deprecated
-
-Print short summaries of calls to [`Atomics.wait()`][] to stderr.
-The output could look like this:
-
-```text
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) started
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) did not wait because the values mismatched
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) started
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) timed out
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) started
-(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) started
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) was woken up by another thread
-(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) was woken up by another thread
-```
-
-The fields here correspond to:
-
-* The thread id as given by [`worker_threads.threadId`][]
-* The base address of the `SharedArrayBuffer` in question, as well as the
- byte offset corresponding to the index passed to `Atomics.wait()`
-* The expected value that was passed to `Atomics.wait()`
-* The timeout passed to `Atomics.wait`
-
### `--trace-deprecation`
<!-- YAML
@@ -3423,7 +3390,6 @@ one is included in the list below.
* `--tls-min-v1.1` * `--tls-min-v1.1`
* `--tls-min-v1.2` * `--tls-min-v1.2`
* `--tls-min-v1.3` * `--tls-min-v1.3`
@ -27,7 +67,7 @@ index d924287df3ca29681cf71e2fbd402314ce8edd97..f2f4d25a838b9758234cd667b0fb537d
* `--trace-env-js-stack` * `--trace-env-js-stack`
* `--trace-env-native-stack` * `--trace-env-native-stack`
diff --git a/doc/node.1 b/doc/node.1 diff --git a/doc/node.1 b/doc/node.1
index 663d123ac728f097e8a76c94cf10c53d059983d7..497f5a61182beafbaa26b945181056353674cfc3 100644 index f41323c799ad34c8e17a36d81e4cc2b16e50e9ee..a9ff54edfad1d053ec1ac544f28e14a1898ac177 100644
--- a/doc/node.1 --- a/doc/node.1
+++ b/doc/node.1 +++ b/doc/node.1
@@ -539,11 +539,6 @@ but the option is supported for compatibility with older Node.js versions. @@ -539,11 +539,6 @@ but the option is supported for compatibility with older Node.js versions.
@ -110,7 +150,7 @@ index 0c2a4d344c991c2ca0d9d90934cf7921abf2a629..19d9fb77f1aaf003e43b7d7016f45e6c
isolate_->SetPromiseHook(TracePromises); isolate_->SetPromiseHook(TracePromises);
} }
diff --git a/src/node_options.cc b/src/node_options.cc diff --git a/src/node_options.cc b/src/node_options.cc
index 9829b0b2b2d013b93ac14d3ec6d46c35abcc4635..5fb2e713a50185b997935cb15fddd7b8b65a5b82 100644 index d6988a5a8c068022d10607c32e57ac667f821337..4deaa52a8a4688bca32d41b74124604b6e33c80b 100644
--- a/src/node_options.cc --- a/src/node_options.cc
+++ b/src/node_options.cc +++ b/src/node_options.cc
@@ -773,10 +773,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { @@ -773,10 +773,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
@ -125,7 +165,7 @@ index 9829b0b2b2d013b93ac14d3ec6d46c35abcc4635..5fb2e713a50185b997935cb15fddd7b8
"show stack traces on deprecations", "show stack traces on deprecations",
&EnvironmentOptions::trace_deprecation, &EnvironmentOptions::trace_deprecation,
diff --git a/src/node_options.h b/src/node_options.h diff --git a/src/node_options.h b/src/node_options.h
index eb18fdd617fd19e5b97cd67f351e70c28fee3e75..216c0f92167bd131e5ef2ea96ad47425ff51c3f7 100644 index 2b7df46312b8be58d6062b6a2f6084247e075c37..2d52cde518926577834f77424fa5b2231ca3374e 100644
--- a/src/node_options.h --- a/src/node_options.h
+++ b/src/node_options.h +++ b/src/node_options.h
@@ -204,7 +204,6 @@ class EnvironmentOptions : public Options { @@ -204,7 +204,6 @@ class EnvironmentOptions : public Options {

View file

@ -18,10 +18,10 @@ Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
diff --git a/doc/api/cli.md b/doc/api/cli.md diff --git a/doc/api/cli.md b/doc/api/cli.md
index cc311472678108f21eed70281e91b0d40c5fe7b6..d924287df3ca29681cf71e2fbd402314ce8edd97 100644 index 78c0794a57fd4fdcdd8a64fe98a6b13f9ef3f23a..404e87e6d1237b5ee79cafd8a959c1b6d9d23fe5 100644
--- a/doc/api/cli.md --- a/doc/api/cli.md
+++ b/doc/api/cli.md +++ b/doc/api/cli.md
@@ -3423,7 +3423,6 @@ V8 options that are allowed are: @@ -3461,7 +3461,6 @@ V8 options that are allowed are:
* `--disallow-code-generation-from-strings` * `--disallow-code-generation-from-strings`
* `--enable-etw-stack-walking` * `--enable-etw-stack-walking`
* `--expose-gc` * `--expose-gc`
@ -30,10 +30,10 @@ index cc311472678108f21eed70281e91b0d40c5fe7b6..d924287df3ca29681cf71e2fbd402314
* `--jitless` * `--jitless`
* `--max-old-space-size` * `--max-old-space-size`
diff --git a/src/node_options.cc b/src/node_options.cc diff --git a/src/node_options.cc b/src/node_options.cc
index d2e945b1d6ef6729709cc73c238cfae46d4e56b6..9829b0b2b2d013b93ac14d3ec6d46c35abcc4635 100644 index 367f7d9b1450e4d9e6d8fef36a2234e7d1344804..d6988a5a8c068022d10607c32e57ac667f821337 100644
--- a/src/node_options.cc --- a/src/node_options.cc
+++ b/src/node_options.cc +++ b/src/node_options.cc
@@ -995,11 +995,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( @@ -1001,11 +1001,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
"disallow eval and friends", "disallow eval and friends",
V8Option{}, V8Option{},
kAllowedInEnvvar); kAllowedInEnvvar);

View file

@ -8,7 +8,7 @@ to child processes spawned with `ELECTRON_RUN_AS_NODE` which is used
by the crashpad client to connect with the handler process. by the crashpad client to connect with the handler process.
diff --git a/lib/child_process.js b/lib/child_process.js diff --git a/lib/child_process.js b/lib/child_process.js
index e848b3d5ee9b13ea3ea303eb3b57ef47ef951580..5b89c420f1a917526ab311fed52bff01637a86fe 100644 index 655349b6fa17217a9202616224032a36fd01e284..bf62c5adf0e0d75cb50636f365f71db82c29ba29 100644
--- a/lib/child_process.js --- a/lib/child_process.js
+++ b/lib/child_process.js +++ b/lib/child_process.js
@@ -62,6 +62,7 @@ let debug = require('internal/util/debuglog').debuglog( @@ -62,6 +62,7 @@ let debug = require('internal/util/debuglog').debuglog(
@ -19,7 +19,7 @@ index e848b3d5ee9b13ea3ea303eb3b57ef47ef951580..5b89c420f1a917526ab311fed52bff01
const { const {
AbortError, AbortError,
@@ -154,7 +155,6 @@ function fork(modulePath, args = [], options) { @@ -156,7 +157,6 @@ function fork(modulePath, args = [], options) {
ArrayPrototypeSplice(execArgv, index - 1, 2); ArrayPrototypeSplice(execArgv, index - 1, 2);
} }
} }
@ -27,11 +27,11 @@ index e848b3d5ee9b13ea3ea303eb3b57ef47ef951580..5b89c420f1a917526ab311fed52bff01
args = [...execArgv, modulePath, ...args]; args = [...execArgv, modulePath, ...args];
if (typeof options.stdio === 'string') { if (typeof options.stdio === 'string') {
@@ -610,6 +610,22 @@ function normalizeSpawnArguments(file, args, options) { @@ -637,6 +637,22 @@ function normalizeSpawnArguments(file, args, options) {
'options.windowsVerbatimArguments'); 'options.windowsVerbatimArguments');
} }
+ const env = options.env || process.env; + const env = options.env || { ...process.env };
+ +
+ if ((process.platform === 'linux') && + if ((process.platform === 'linux') &&
+ ObjectPrototypeHasOwnProperty(env, 'ELECTRON_RUN_AS_NODE') && + ObjectPrototypeHasOwnProperty(env, 'ELECTRON_RUN_AS_NODE') &&
@ -50,11 +50,12 @@ index e848b3d5ee9b13ea3ea303eb3b57ef47ef951580..5b89c420f1a917526ab311fed52bff01
if (options.shell) { if (options.shell) {
validateArgumentNullCheck(options.shell, 'options.shell'); validateArgumentNullCheck(options.shell, 'options.shell');
const command = ArrayPrototypeJoin([file, ...args], ' '); const command = ArrayPrototypeJoin([file, ...args], ' ');
@@ -643,7 +659,6 @@ function normalizeSpawnArguments(file, args, options) { @@ -670,8 +686,6 @@ function normalizeSpawnArguments(file, args, options) {
ArrayPrototypeUnshift(args, file); ArrayPrototypeUnshift(args, file);
} }
- const env = options.env || process.env; - // Shallow copy to guarantee changes won't impact process.env
- const env = options.env || { ...process.env };
const envPairs = []; const envPairs = [];
// process.env.NODE_V8_COVERAGE always propagates, making it possible to // process.env.NODE_V8_COVERAGE always propagates, making it possible to

View file

@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Thu, 26 Jun 2025 12:46:41 +0000
Subject: fix: -Wmismatched-new-delete in debug_utils.cc
Fixes the following error:
Error: ../../third_party/electron_node/src/debug_utils.cc(491,11): error: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Werror,-Wmismatched-new-delete]
491 | delete str;
| ^
| []
../../third_party/electron_node/src/debug_utils.cc(487,23): note: allocated with 'new[]' here
487 | char* str = new char[size];
| ^
1 error generated.
Upstreamed in https://github.com/nodejs/node/pull/58844.
diff --git a/src/debug_utils.cc b/src/debug_utils.cc
index 97884b9a0f8d6d88e36da06b05642505c767338d..65283ef31da35d0f08fcff7a5e79bf960d861126 100644
--- a/src/debug_utils.cc
+++ b/src/debug_utils.cc
@@ -488,7 +488,7 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
WideCharToMultiByte(
CP_UTF8, 0, module_name, -1, str, size, nullptr, nullptr);
list.emplace_back(str);
- delete str;
+ delete[] str;
}
}
}

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. the fact that we do not build node with gyp.
diff --git a/common.gypi b/common.gypi diff --git a/common.gypi b/common.gypi
index b88371ec13da5a287e18f7224bb4970fc94dce66..cf643bcd0bc9080b80bf12afeebc69f2db74bb54 100644 index 20135003dd040ebfb3661c81c89fde93ce00fbfb..33af43cd768c24b26d523f3db66eb8b9eb26859a 100644
--- a/common.gypi --- a/common.gypi
+++ b/common.gypi +++ b/common.gypi
@@ -91,6 +91,23 @@ @@ -91,6 +91,23 @@

View file

@ -11,7 +11,7 @@ We can fix this by allowing the C++ implementation of legacyMainResolve to use
a fileExists function that does take Asar into account. a fileExists function that does take Asar into account.
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
index 2879e5cf541fb4d226cfd7cc0fe367ca448fb926..03082f0ec4f91382933eec48e77331cdf6f04943 100644 index 7572bfc34d4c21b2ad618a68c4a2026400ad7338..5ce696a4e50d8d8bbe311340d665b3bdc330327f 100644
--- a/lib/internal/modules/esm/resolve.js --- a/lib/internal/modules/esm/resolve.js
+++ b/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js
@@ -28,14 +28,13 @@ const { BuiltinModule } = require('internal/bootstrap/realm'); @@ -28,14 +28,13 @@ const { BuiltinModule } = require('internal/bootstrap/realm');
@ -37,7 +37,7 @@ index 2879e5cf541fb4d226cfd7cc0fe367ca448fb926..03082f0ec4f91382933eec48e77331cd
+function fileExists(url) { +function fileExists(url) {
+ const namespaced = toNamespacedPath(toPathIfFileURL(url)); + const namespaced = toNamespacedPath(toPathIfFileURL(url));
+ return internalFsBinding.internalModuleStat(internalFsBinding, namespaced) === 0; + return internalFsBinding.internalModuleStat(namespaced) === 0;
+} +}
+ +
/** /**
@ -53,10 +53,10 @@ index 2879e5cf541fb4d226cfd7cc0fe367ca448fb926..03082f0ec4f91382933eec48e77331cd
const maybeMain = resolvedOption <= legacyMainResolveExtensionsIndexes.kResolvedByMainIndexNode ? const maybeMain = resolvedOption <= legacyMainResolveExtensionsIndexes.kResolvedByMainIndexNode ?
packageConfig.main || './' : ''; packageConfig.main || './' : '';
diff --git a/src/node_file.cc b/src/node_file.cc diff --git a/src/node_file.cc b/src/node_file.cc
index fe28c340c9b50384e79fe14263d8b3807f49e0b3..37172158d318d6569194fd3c5441d107e155e54c 100644 index 7d174113a22cb26e767f8756ce0f0cdedd68d7d7..f3142dab526064114771af154c3389961771b5dc 100644
--- a/src/node_file.cc --- a/src/node_file.cc
+++ b/src/node_file.cc +++ b/src/node_file.cc
@@ -3523,13 +3523,25 @@ static void CpSyncCopyDir(const FunctionCallbackInfo<Value>& args) { @@ -3482,13 +3482,25 @@ static void CpSyncCopyDir(const FunctionCallbackInfo<Value>& args) {
} }
BindingData::FilePathIsFileReturnType BindingData::FilePathIsFile( BindingData::FilePathIsFileReturnType BindingData::FilePathIsFile(
@ -83,7 +83,7 @@ index fe28c340c9b50384e79fe14263d8b3807f49e0b3..37172158d318d6569194fd3c5441d107
uv_fs_t req; uv_fs_t req;
int rc = uv_fs_stat(env->event_loop(), &req, file_path.c_str(), nullptr); int rc = uv_fs_stat(env->event_loop(), &req, file_path.c_str(), nullptr);
@@ -3587,6 +3599,11 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) { @@ -3546,6 +3558,11 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
std::optional<std::string> initial_file_path; std::optional<std::string> initial_file_path;
std::string file_path; std::string file_path;
@ -95,7 +95,7 @@ index fe28c340c9b50384e79fe14263d8b3807f49e0b3..37172158d318d6569194fd3c5441d107
if (args.Length() >= 2 && args[1]->IsString()) { if (args.Length() >= 2 && args[1]->IsString()) {
auto package_config_main = Utf8Value(isolate, args[1]).ToString(); auto package_config_main = Utf8Value(isolate, args[1]).ToString();
@@ -3607,7 +3624,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) { @@ -3566,7 +3583,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
BufferValue buff_file_path(isolate, local_file_path); BufferValue buff_file_path(isolate, local_file_path);
ToNamespacedPath(env, &buff_file_path); ToNamespacedPath(env, &buff_file_path);
@ -104,7 +104,7 @@ index fe28c340c9b50384e79fe14263d8b3807f49e0b3..37172158d318d6569194fd3c5441d107
case BindingData::FilePathIsFileReturnType::kIsFile: case BindingData::FilePathIsFileReturnType::kIsFile:
return args.GetReturnValue().Set(i); return args.GetReturnValue().Set(i);
case BindingData::FilePathIsFileReturnType::kIsNotFile: case BindingData::FilePathIsFileReturnType::kIsNotFile:
@@ -3644,7 +3661,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) { @@ -3603,7 +3620,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
BufferValue buff_file_path(isolate, local_file_path); BufferValue buff_file_path(isolate, local_file_path);
ToNamespacedPath(env, &buff_file_path); ToNamespacedPath(env, &buff_file_path);

View file

@ -13,10 +13,10 @@ if the override has been disabled.
This will be upstreamed. This will be upstreamed.
diff --git a/lib/internal/assert/utils.js b/lib/internal/assert/utils.js diff --git a/lib/internal/assert/utils.js b/lib/internal/assert/utils.js
index 59b5a16f1309a5e4055bccfdb7a529045ad30402..bfdaf6211466a01b64b7942f7b16c480283278ff 100644 index d059fa89baf7d4f7d921d00871a97494be4a166a..a0f7fd2e4512e9b4196bbf5fe4390b00e5e2d9a8 100644
--- a/lib/internal/assert/utils.js --- a/lib/internal/assert/utils.js
+++ b/lib/internal/assert/utils.js +++ b/lib/internal/assert/utils.js
@@ -25,6 +25,7 @@ const AssertionError = require('internal/assert/assertion_error'); @@ -24,6 +24,7 @@ const AssertionError = require('internal/assert/assertion_error');
const { openSync, closeSync, readSync } = require('fs'); const { openSync, closeSync, readSync } = require('fs');
const { EOL } = require('internal/constants'); const { EOL } = require('internal/constants');
const { BuiltinModule } = require('internal/bootstrap/realm'); const { BuiltinModule } = require('internal/bootstrap/realm');
@ -24,7 +24,7 @@ index 59b5a16f1309a5e4055bccfdb7a529045ad30402..bfdaf6211466a01b64b7942f7b16c480
const { isError } = require('internal/util'); const { isError } = require('internal/util');
const errorCache = new SafeMap(); const errorCache = new SafeMap();
@@ -167,8 +168,16 @@ function getErrMessage(message, fn) { @@ -166,8 +167,16 @@ function getErrMessage(message, fn) {
ErrorCaptureStackTrace(err, fn); ErrorCaptureStackTrace(err, fn);
if (errorStackTraceLimitIsWritable) Error.stackTraceLimit = tmpLimit; if (errorStackTraceLimitIsWritable) Error.stackTraceLimit = tmpLimit;
@ -44,10 +44,10 @@ index 59b5a16f1309a5e4055bccfdb7a529045ad30402..bfdaf6211466a01b64b7942f7b16c480
let filename = call.getFileName(); let filename = call.getFileName();
const line = call.getLineNumber() - 1; const line = call.getLineNumber() - 1;
diff --git a/src/node_options.cc b/src/node_options.cc diff --git a/src/node_options.cc b/src/node_options.cc
index 14f7764c995e8de6582faf58c9b98a9cbe4fab73..d2e945b1d6ef6729709cc73c238cfae46d4e56b6 100644 index 9cf107b1048208ffcb69ff91e0d36ffacc741805..367f7d9b1450e4d9e6d8fef36a2234e7d1344804 100644
--- a/src/node_options.cc --- a/src/node_options.cc
+++ b/src/node_options.cc +++ b/src/node_options.cc
@@ -1560,14 +1560,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) { @@ -1566,14 +1566,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
} }
Isolate* isolate = args.GetIsolate(); Isolate* isolate = args.GetIsolate();

View file

@ -210,18 +210,18 @@ index d22281abbd5c3cab3aaa3ac494301fa6b4a8a968..5f0c6a4aed2e868a1a1049212edf2187
s.pipe(h).on('data', common.mustCall(function(c) { s.pipe(h).on('data', common.mustCall(function(c) {
assert.strictEqual(c, expect); assert.strictEqual(c, expect);
diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js
index 61145aee0727fbe0b9781acdb3eeb641e7010729..51693e637b310981f76f23c2f35d43e4d2d9c4ef 100644 index 929dd36c669239804f2cfc5168bd3bf6e15855e6..8ebe599bbd21ad30e5041e0eab1e5898caf33e49 100644
--- a/test/parallel/test-crypto-hash.js --- a/test/parallel/test-crypto-hash.js
+++ b/test/parallel/test-crypto-hash.js +++ b/test/parallel/test-crypto-hash.js
@@ -183,7 +183,7 @@ assert.throws( @@ -182,7 +182,7 @@ assert.throws(
} }
// Test XOF hash functions and the outputLength option. // Test XOF hash functions and the outputLength option.
-{ -{
+if (!process.features.openssl_is_boringssl) { +if (!process.features.openssl_is_boringssl) {
// Default outputLengths. Since OpenSSL 3.4 an outputLength is mandatory // Default outputLengths.
if (!hasOpenSSL(3, 4)) { assert.strictEqual(crypto.createHash('shake128').digest('hex'),
assert.strictEqual(crypto.createHash('shake128').digest('hex'), '7f9c2ba4e88f827d616045507605853e');
diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js
index 48cd1ed4df61aaddeee8785cb90f83bdd9628187..d09e01712c617597833bb1320a32a967bcf1d318 100644 index 48cd1ed4df61aaddeee8785cb90f83bdd9628187..d09e01712c617597833bb1320a32a967bcf1d318 100644
--- a/test/parallel/test-crypto-padding.js --- a/test/parallel/test-crypto-padding.js

View file

@ -6,10 +6,10 @@ Subject: fix: do not resolve electron entrypoints
This wastes fs cycles and can result in strange behavior if this path actually exists on disk This wastes fs cycles and can result in strange behavior if this path actually exists on disk
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index bbd3085cfbf14aefd611954fa836f6c96d7e402c..9e71d2d0b79656e212fb21efdb3efcf988529f5e 100644 index 8b55082d2bb0ce743b190a601aff0651095049cd..eb71a78c91b277157980aa1359578390c9fd1ae3 100644
--- a/lib/internal/modules/esm/translators.js --- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js
@@ -291,6 +291,9 @@ function cjsPreparseModuleExports(filename, source, isMain, format) { @@ -293,6 +293,9 @@ function cjsPreparseModuleExports(filename, source, isMain, format) {
if (module && module[kModuleExportNames] !== undefined) { if (module && module[kModuleExportNames] !== undefined) {
return { module, exportNames: module[kModuleExportNames] }; return { module, exportNames: module[kModuleExportNames] };
} }

View file

@ -8,10 +8,10 @@ an API override to replace the native `ReadFileSync` in the `modules`
binding. binding.
diff --git a/src/env_properties.h b/src/env_properties.h diff --git a/src/env_properties.h b/src/env_properties.h
index 3df4e303e05105b43a542456546cbc050d0445fa..4f7aee6cb64b4c1d25e98b43d13e747c4546adaa 100644 index d4961ac90fbc7fffe44f7d494bfae37ba0fa07e0..7b414e6733adff5740bd8e661846824962048c3e 100644
--- a/src/env_properties.h --- a/src/env_properties.h
+++ b/src/env_properties.h +++ b/src/env_properties.h
@@ -502,6 +502,7 @@ @@ -505,6 +505,7 @@
V(maybe_cache_generated_source_map, v8::Function) \ V(maybe_cache_generated_source_map, v8::Function) \
V(messaging_deserialize_create_object, v8::Function) \ V(messaging_deserialize_create_object, v8::Function) \
V(message_port, v8::Object) \ V(message_port, v8::Object) \

View file

@ -18,10 +18,10 @@ index 9519f947b8dfdc69808839948c9cb8434a0acf0e..23ce72d479f638c33edffcea7c35f5da
/** /**
diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js
index 5ba13096b98047ff33e4d44167c2a069ccc5e69d..09a332c0999086b30fd952d9456f788925240e27 100644 index e718d7b3e7c11addc78cf7af33c93f63a9cb247b..3334818153068468967baa5adc1ed2382592ec76 100644
--- a/lib/internal/modules/esm/load.js --- a/lib/internal/modules/esm/load.js
+++ b/lib/internal/modules/esm/load.js +++ b/lib/internal/modules/esm/load.js
@@ -106,7 +106,7 @@ async function defaultLoad(url, context = kEmptyObject) { @@ -81,7 +81,7 @@ function defaultLoad(url, context = kEmptyObject) {
throwIfUnsupportedURLScheme(urlInstance); throwIfUnsupportedURLScheme(urlInstance);
@ -30,16 +30,16 @@ index 5ba13096b98047ff33e4d44167c2a069ccc5e69d..09a332c0999086b30fd952d9456f7889
source = null; source = null;
format ??= 'builtin'; format ??= 'builtin';
} else if (format !== 'commonjs' || defaultType === 'module') { } else if (format !== 'commonjs' || defaultType === 'module') {
@@ -119,7 +119,7 @@ async function defaultLoad(url, context = kEmptyObject) { @@ -94,7 +94,7 @@ function defaultLoad(url, context = kEmptyObject) {
// Now that we have the source for the module, run `defaultGetFormat` to detect its format. // Now that we have the source for the module, run `defaultGetFormat` to detect its format.
format = await defaultGetFormat(urlInstance, context); format = defaultGetFormat(urlInstance, context);
- if (format === 'commonjs') { - if (format === 'commonjs') {
+ if (format === 'electron' || format === 'commonjs') { + if (format === 'electron' || format === 'commonjs') {
// For backward compatibility reasons, we need to discard the source in // For backward compatibility reasons, we need to discard the source in
// order for the CJS loader to re-fetch it. // order for the CJS loader to re-fetch it.
source = null; source = null;
@@ -167,7 +167,7 @@ function defaultLoadSync(url, context = kEmptyObject) { @@ -142,7 +142,7 @@ function defaultLoadSync(url, context = kEmptyObject) {
throwIfUnsupportedURLScheme(urlInstance, false); throwIfUnsupportedURLScheme(urlInstance, false);
@ -48,7 +48,7 @@ index 5ba13096b98047ff33e4d44167c2a069ccc5e69d..09a332c0999086b30fd952d9456f7889
source = null; source = null;
} else if (source == null) { } else if (source == null) {
({ responseURL, source } = getSourceSync(urlInstance, context)); ({ responseURL, source } = getSourceSync(urlInstance, context));
@@ -200,12 +200,13 @@ function throwIfUnsupportedURLScheme(parsed) { @@ -175,12 +175,13 @@ function throwIfUnsupportedURLScheme(parsed) {
protocol !== 'file:' && protocol !== 'file:' &&
protocol !== 'data:' && protocol !== 'data:' &&
protocol !== 'node:' && protocol !== 'node:' &&
@ -64,10 +64,10 @@ index 5ba13096b98047ff33e4d44167c2a069ccc5e69d..09a332c0999086b30fd952d9456f7889
} }
} }
diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js
index 5a817ed0434b8bc08f9b9bd260c978bbe5ddc664..f9dba42cddb08f69e02834f76d6d80c5e47a637d 100644 index 8d98d50395cf7fbbaf9ae30387727bff5c6cd550..ed3b3c02bbdac78c163d589557651618814685a5 100644
--- a/lib/internal/modules/esm/loader.js --- a/lib/internal/modules/esm/loader.js
+++ b/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js
@@ -492,7 +492,7 @@ class ModuleLoader { @@ -494,7 +494,7 @@ class ModuleLoader {
} }
const cjsModule = wrap[imported_cjs_symbol]; const cjsModule = wrap[imported_cjs_symbol];
@ -77,10 +77,10 @@ index 5a817ed0434b8bc08f9b9bd260c978bbe5ddc664..f9dba42cddb08f69e02834f76d6d80c5
// Check if the ESM initiating import CJS is being required by the same CJS module. // Check if the ESM initiating import CJS is being required by the same CJS module.
if (cjsModule?.[kIsExecuting]) { if (cjsModule?.[kIsExecuting]) {
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
index bfd9bd3d127404de1cbb6f30c43ab0342590759d..9e7d8ef0adef3b68a3ec186e4b218f591aa69266 100644 index 859b6bfedac4bbee2df054f9ebca7cbaaed45f18..a609671e64e3b159f6f00d4f69cde2039cc0bc38 100644
--- a/lib/internal/modules/esm/resolve.js --- a/lib/internal/modules/esm/resolve.js
+++ b/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js
@@ -751,6 +751,7 @@ function packageImportsResolve(name, base, conditions) { @@ -750,6 +750,7 @@ function packageImportsResolve(name, base, conditions) {
throw importNotDefined(name, packageJSONUrl, base); throw importNotDefined(name, packageJSONUrl, base);
} }
@ -88,7 +88,7 @@ index bfd9bd3d127404de1cbb6f30c43ab0342590759d..9e7d8ef0adef3b68a3ec186e4b218f59
/** /**
* Resolves a package specifier to a URL. * Resolves a package specifier to a URL.
@@ -765,6 +766,11 @@ function packageResolve(specifier, base, conditions) { @@ -764,6 +765,11 @@ function packageResolve(specifier, base, conditions) {
return new URL('node:' + specifier); return new URL('node:' + specifier);
} }
@ -101,10 +101,10 @@ index bfd9bd3d127404de1cbb6f30c43ab0342590759d..9e7d8ef0adef3b68a3ec186e4b218f59
const packageConfig = packageJsonReader.read(packageJSONPath, { __proto__: null, specifier, base, isESM: true }); const packageConfig = packageJsonReader.read(packageJSONPath, { __proto__: null, specifier, base, isESM: true });
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index 0695b47a8a8f78451c20c025a3d9dac7cadab686..1db58d31dad24cd2da6bdc5e45e9dd4f0b899a23 100644 index 3a69558d7a3dba5bfcb7d3c13299f698fe6c18a1..de1539cebeb1874cbafbe76a4f03217693db2aa1 100644
--- a/lib/internal/modules/esm/translators.js --- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js
@@ -186,7 +186,7 @@ function createCJSModuleWrap(url, source, isMain, format, loadCJS = loadCJSModul @@ -188,7 +188,7 @@ function createCJSModuleWrap(url, source, isMain, format, loadCJS = loadCJSModul
const { exportNames, module } = cjsPreparseModuleExports(filename, source, isMain, format); const { exportNames, module } = cjsPreparseModuleExports(filename, source, isMain, format);
cjsCache.set(url, module); cjsCache.set(url, module);
@ -113,7 +113,7 @@ index 0695b47a8a8f78451c20c025a3d9dac7cadab686..1db58d31dad24cd2da6bdc5e45e9dd4f
[...exportNames] : ['default', ...exportNames]; [...exportNames] : ['default', ...exportNames];
if (isMain) { if (isMain) {
@@ -208,8 +208,8 @@ function createCJSModuleWrap(url, source, isMain, format, loadCJS = loadCJSModul @@ -210,8 +210,8 @@ function createCJSModuleWrap(url, source, isMain, format, loadCJS = loadCJSModul
({ exports } = module); ({ exports } = module);
} }
for (const exportName of exportNames) { for (const exportName of exportNames) {
@ -124,7 +124,7 @@ index 0695b47a8a8f78451c20c025a3d9dac7cadab686..1db58d31dad24cd2da6bdc5e45e9dd4f
continue; continue;
} }
// We might trigger a getter -> dont fail. // We might trigger a getter -> dont fail.
@@ -243,6 +243,10 @@ translators.set('require-commonjs', (url, source, isMain) => { @@ -245,6 +245,10 @@ translators.set('require-commonjs', (url, source, isMain) => {
return createCJSModuleWrap(url, source, isMain, 'commonjs'); return createCJSModuleWrap(url, source, isMain, 'commonjs');
}); });
@ -136,10 +136,10 @@ index 0695b47a8a8f78451c20c025a3d9dac7cadab686..1db58d31dad24cd2da6bdc5e45e9dd4f
// This translator function must be sync, as `require` is sync. // This translator function must be sync, as `require` is sync.
translators.set('require-commonjs-typescript', (url, source, isMain) => { translators.set('require-commonjs-typescript', (url, source, isMain) => {
diff --git a/lib/internal/url.js b/lib/internal/url.js diff --git a/lib/internal/url.js b/lib/internal/url.js
index f6e58e196860fc9321e3367f8461ec2647d7e8f8..a80ecee888222e02f5d03f42f7af2c1ab9750cab 100644 index b6057ae6656e03d98ea40c018369419749409c6d..9bd9abd49523406fd9ac77f2b5efe311da1fa9aa 100644
--- a/lib/internal/url.js --- a/lib/internal/url.js
+++ b/lib/internal/url.js +++ b/lib/internal/url.js
@@ -1505,6 +1505,8 @@ function fileURLToPath(path, options = kEmptyObject) { @@ -1604,6 +1604,8 @@ function fileURLToPath(path, options = kEmptyObject) {
path = new URL(path); path = new URL(path);
else if (!isURL(path)) else if (!isURL(path))
throw new ERR_INVALID_ARG_TYPE('path', ['string', 'URL'], path); throw new ERR_INVALID_ARG_TYPE('path', ['string', 'URL'], path);

View file

@ -172,7 +172,7 @@ index e5bf2b529bf23914677e25d7468aad58a4684557..9a3c6029ff3319cce58c79782a7bd5d1
}; };
// Check to see if the given public key is suitable for this DH instance. // Check to see if the given public key is suitable for this DH instance.
diff --git a/node.gni b/node.gni diff --git a/node.gni b/node.gni
index 62cd49c6a87074912a1cb6792576c8d4f239b669..165b26a79a7f2b74d2a2252dc2350b2e10c091e6 100644 index e2407027ab05e59b2f0f1c213b98ea469db7a91b..c64761b730e61edcdc0e46a48699f2fd5bb1c0a6 100644
--- a/node.gni --- a/node.gni
+++ b/node.gni +++ b/node.gni
@@ -11,7 +11,7 @@ declare_args() { @@ -11,7 +11,7 @@ declare_args() {
@ -228,10 +228,10 @@ index d94f6e1c82c4a62547b3b395f375c86ce4deb5de..b81b9005365272217c77e2b9289bd9f8
X509View ca(sk_X509_value(peer_certs.get(), i)); X509View ca(sk_X509_value(peer_certs.get(), i));
if (!cert->view().isIssuedBy(ca)) continue; if (!cert->view().isIssuedBy(ca)) continue;
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
index a054e4c1285208c9ba8b9679c284f459f1ace690..3de8ef4fafcdbdc2cb0ce31de162663d5272340f 100644 index 64b850089ec837915910a243b1d5e4ed68655f63..508f7c1a49a0812583363c9e35244c3f5fbf5f89 100644
--- a/src/crypto/crypto_context.cc --- a/src/crypto/crypto_context.cc
+++ b/src/crypto/crypto_context.cc +++ b/src/crypto/crypto_context.cc
@@ -123,7 +123,7 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx, @@ -121,7 +121,7 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,
// the CA certificates. // the CA certificates.
SSL_CTX_clear_extra_chain_certs(ctx); SSL_CTX_clear_extra_chain_certs(ctx);
@ -396,7 +396,7 @@ index 471fee77531139ce988292470dff443fdfb05b07..931f7c2ae3d7e12afce471545d610d22
return EVPKeyCtxPointer(); return EVPKeyCtxPointer();
diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc
index b38a9a377738fd5fe6cc89c3a27c403bf6a97715..0cd43c2005b431e180b7483cb89825a75e1fe03f 100644 index 7238cda445fd663e6b45fa134f31d017bb267dfc..522655555cdb2ab2083797f736bf167d1f42c15e 100644
--- a/src/crypto/crypto_keys.cc --- a/src/crypto/crypto_keys.cc
+++ b/src/crypto/crypto_keys.cc +++ b/src/crypto/crypto_keys.cc
@@ -949,6 +949,7 @@ void KeyObjectHandle::GetAsymmetricKeyType( @@ -949,6 +949,7 @@ void KeyObjectHandle::GetAsymmetricKeyType(
@ -541,21 +541,6 @@ index c42493ad958508f650917bf5ca92088714a5056c..07accfbcca491966c6c8ad9c20e146db
#if OPENSSL_VERSION_MAJOR >= 3 #if OPENSSL_VERSION_MAJOR >= 3
// We declare another alias here to avoid having to include crypto_util.h // We declare another alias here to avoid having to include crypto_util.h
using EVPMDPointer = DeleteFnPtr<EVP_MD, EVP_MD_free>; using EVPMDPointer = DeleteFnPtr<EVP_MD, EVP_MD_free>;
diff --git a/src/node_config.cc b/src/node_config.cc
index 6032bbd10f41da7bae44828a8e908c1bec0ea0b6..2013de54f0f6a036e8378deefbff8d7cb5f7cfb2 100644
--- a/src/node_config.cc
+++ b/src/node_config.cc
@@ -7,6 +7,10 @@
#include "node_options.h"
#include "util-inl.h"
+#if HAVE_OPENSSL
+#include <openssl/base.h>
+#endif
+
namespace node {
using v8::Context;
diff --git a/src/node_metadata.h b/src/node_metadata.h diff --git a/src/node_metadata.h b/src/node_metadata.h
index 7b2072ad39c3f1a7c73101b25b69beb781141e26..d23536d88d21255d348175425a59e2424332cd19 100644 index 7b2072ad39c3f1a7c73101b25b69beb781141e26..d23536d88d21255d348175425a59e2424332cd19 100644
--- a/src/node_metadata.h --- a/src/node_metadata.h
@ -570,7 +555,7 @@ index 7b2072ad39c3f1a7c73101b25b69beb781141e26..d23536d88d21255d348175425a59e242
#if NODE_OPENSSL_HAS_QUIC #if NODE_OPENSSL_HAS_QUIC
#include <openssl/quic.h> #include <openssl/quic.h>
diff --git a/src/node_options.cc b/src/node_options.cc diff --git a/src/node_options.cc b/src/node_options.cc
index da39abf79c53fcc3d83d3431deda9dbdf3b0621e..14f7764c995e8de6582faf58c9b98a9cbe4fab73 100644 index 228fbe645587ab2d36574b46f1a4f6668bd56177..9cf107b1048208ffcb69ff91e0d36ffacc741805 100644
--- a/src/node_options.cc --- a/src/node_options.cc
+++ b/src/node_options.cc +++ b/src/node_options.cc
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
@ -583,7 +568,7 @@ index da39abf79c53fcc3d83d3431deda9dbdf3b0621e..14f7764c995e8de6582faf58c9b98a9c
#endif #endif
diff --git a/src/node_options.h b/src/node_options.h diff --git a/src/node_options.h b/src/node_options.h
index 165950c207ca752ec942ef27a671af66cbd2b938..eb18fdd617fd19e5b97cd67f351e70c28fee3e75 100644 index 0b75516eb426929dc95b7531a00bdb01d1c39185..2b7df46312b8be58d6062b6a2f6084247e075c37 100644
--- a/src/node_options.h --- a/src/node_options.h
+++ b/src/node_options.h +++ b/src/node_options.h
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@

View file

@ -6,7 +6,7 @@ Subject: fix: lazyload fs in esm loaders to apply asar patches
Changes { foo } from fs to just "fs.foo" so that our patching of fs is applied to esm loaders Changes { foo } from fs to just "fs.foo" so that our patching of fs is applied to esm loaders
diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js
index 09a332c0999086b30fd952d9456f788925240e27..910ac85cdc86e7fb3f850f7edf0b95ea09d464dc 100644 index 3334818153068468967baa5adc1ed2382592ec76..ab4c8a4d00f1813e72f1ea8349850b40f55a393e 100644
--- a/lib/internal/modules/esm/load.js --- a/lib/internal/modules/esm/load.js
+++ b/lib/internal/modules/esm/load.js +++ b/lib/internal/modules/esm/load.js
@@ -10,7 +10,7 @@ const { @@ -10,7 +10,7 @@ const {
@ -18,17 +18,7 @@ index 09a332c0999086b30fd952d9456f788925240e27..910ac85cdc86e7fb3f850f7edf0b95ea
const defaultType = const defaultType =
getOptionValue('--experimental-default-type'); getOptionValue('--experimental-default-type');
@@ -38,8 +38,7 @@ async function getSource(url, context) { @@ -38,7 +38,7 @@ function getSourceSync(url, context) {
const responseURL = href;
let source;
if (protocol === 'file:') {
- const { readFile: readFileAsync } = require('internal/fs/promises').exports;
- source = await readFileAsync(url);
+ source = await fs.promises.readFile(url);
} else if (protocol === 'data:') {
const result = dataURLProcessor(url);
if (result === 'failure') {
@@ -63,7 +62,7 @@ function getSourceSync(url, context) {
const responseURL = href; const responseURL = href;
let source; let source;
if (protocol === 'file:') { if (protocol === 'file:') {
@ -38,7 +28,7 @@ index 09a332c0999086b30fd952d9456f788925240e27..910ac85cdc86e7fb3f850f7edf0b95ea
const result = dataURLProcessor(url); const result = dataURLProcessor(url);
if (result === 'failure') { if (result === 'failure') {
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
index 9e7d8ef0adef3b68a3ec186e4b218f591aa69266..2879e5cf541fb4d226cfd7cc0fe367ca448fb926 100644 index a609671e64e3b159f6f00d4f69cde2039cc0bc38..7572bfc34d4c21b2ad618a68c4a2026400ad7338 100644
--- a/lib/internal/modules/esm/resolve.js --- a/lib/internal/modules/esm/resolve.js
+++ b/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js
@@ -25,7 +25,7 @@ const { @@ -25,7 +25,7 @@ const {
@ -50,7 +40,7 @@ index 9e7d8ef0adef3b68a3ec186e4b218f591aa69266..2879e5cf541fb4d226cfd7cc0fe367ca
const { getOptionValue } = require('internal/options'); const { getOptionValue } = require('internal/options');
// Do not eagerly grab .manifest, it may be in TDZ // Do not eagerly grab .manifest, it may be in TDZ
const { sep, posix: { relative: relativePosixPath }, resolve } = require('path'); const { sep, posix: { relative: relativePosixPath }, resolve } = require('path');
@@ -277,7 +277,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) { @@ -276,7 +276,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
} }
if (!preserveSymlinks) { if (!preserveSymlinks) {
@ -60,10 +50,10 @@ index 9e7d8ef0adef3b68a3ec186e4b218f591aa69266..2879e5cf541fb4d226cfd7cc0fe367ca
}); });
const { search, hash } = resolved; const { search, hash } = resolved;
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index 1db58d31dad24cd2da6bdc5e45e9dd4f0b899a23..bbd3085cfbf14aefd611954fa836f6c96d7e402c 100644 index de1539cebeb1874cbafbe76a4f03217693db2aa1..8b55082d2bb0ce743b190a601aff0651095049cd 100644
--- a/lib/internal/modules/esm/translators.js --- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js
@@ -24,7 +24,7 @@ const { @@ -25,7 +25,7 @@ const {
const { BuiltinModule } = require('internal/bootstrap/realm'); const { BuiltinModule } = require('internal/bootstrap/realm');
const assert = require('internal/assert'); const assert = require('internal/assert');
@ -72,7 +62,7 @@ index 1db58d31dad24cd2da6bdc5e45e9dd4f0b899a23..bbd3085cfbf14aefd611954fa836f6c9
const { dirname, extname } = require('path'); const { dirname, extname } = require('path');
const { const {
assertBufferSource, assertBufferSource,
@@ -272,7 +272,7 @@ translators.set('commonjs', function commonjsStrategy(url, source, isMain) { @@ -274,7 +274,7 @@ translators.set('commonjs', function commonjsStrategy(url, source, isMain) {
try { try {
// We still need to read the FS to detect the exports. // We still need to read the FS to detect the exports.

View file

@ -7,18 +7,18 @@ Refs https://github.com/electron/electron/pull/45055#issuecomment-2559095439
Can be removed when upstream adopts relevant V8 version. Can be removed when upstream adopts relevant V8 version.
diff --git a/src/crypto/crypto_timing.cc b/src/crypto/crypto_timing.cc diff --git a/src/crypto/crypto_timing.cc b/src/crypto/crypto_timing.cc
index 867a1c4aca54b9d41490d23a5eb55088b7e941cc..09f4c65a18efea262b1f854f993c6f18273f48f5 100644 index fe669d40c31a29334b047b9cfee3067f64ef0a7b..9e5de7bbe574add017cd12ee091304d01e6458d6 100644
--- a/src/crypto/crypto_timing.cc --- a/src/crypto/crypto_timing.cc
+++ b/src/crypto/crypto_timing.cc +++ b/src/crypto/crypto_timing.cc
@@ -11,7 +11,6 @@ @@ -12,7 +12,6 @@ namespace node {
namespace node {
using v8::CFunction;
using v8::FastApiCallbackOptions; using v8::FastApiCallbackOptions;
-using v8::FastApiTypedArray; -using v8::FastApiTypedArray;
using v8::FunctionCallbackInfo; using v8::FunctionCallbackInfo;
using v8::Local; using v8::Local;
using v8::Object; using v8::Object;
@@ -50,14 +49,13 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) { @@ -51,14 +50,13 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) {
} }
bool FastTimingSafeEqual(Local<Value> receiver, bool FastTimingSafeEqual(Local<Value> receiver,
@ -38,7 +38,7 @@ index 867a1c4aca54b9d41490d23a5eb55088b7e941cc..09f4c65a18efea262b1f854f993c6f18
TRACK_V8_FAST_API_CALL("crypto.timingSafeEqual.error"); TRACK_V8_FAST_API_CALL("crypto.timingSafeEqual.error");
v8::HandleScope scope(options.isolate); v8::HandleScope scope(options.isolate);
THROW_ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH(options.isolate); THROW_ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH(options.isolate);
@@ -65,7 +63,7 @@ bool FastTimingSafeEqual(Local<Value> receiver, @@ -66,7 +64,7 @@ bool FastTimingSafeEqual(Local<Value> receiver,
} }
TRACK_V8_FAST_API_CALL("crypto.timingSafeEqual.ok"); TRACK_V8_FAST_API_CALL("crypto.timingSafeEqual.ok");
@ -46,9 +46,9 @@ index 867a1c4aca54b9d41490d23a5eb55088b7e941cc..09f4c65a18efea262b1f854f993c6f18
+ return CRYPTO_memcmp(a_buffer_data, b_buffer_data, a_buffer_length) == 0; + return CRYPTO_memcmp(a_buffer_data, b_buffer_data, a_buffer_length) == 0;
} }
static v8::CFunction fast_equal(v8::CFunction::Make(FastTimingSafeEqual)); static CFunction fast_timing_safe_equal(CFunction::Make(FastTimingSafeEqual));
diff --git a/src/node_buffer.cc b/src/node_buffer.cc diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index b8021c079ca6b141ea99a4abbc828430da9d3093..98ade40ec7a6bc805acb579c8a51dcd5468c2893 100644 index d0338b8a2d9cd3fd9f6db1f0f16f83b198ce0e7e..c4a87539dab49ff40e0951616777b132d4059e01 100644
--- a/src/node_buffer.cc --- a/src/node_buffer.cc
+++ b/src/node_buffer.cc +++ b/src/node_buffer.cc
@@ -44,6 +44,14 @@ @@ -44,6 +44,14 @@
@ -193,58 +193,6 @@ index b8021c079ca6b141ea99a4abbc828430da9d3093..98ade40ec7a6bc805acb579c8a51dcd5
} }
static const v8::CFunction fast_write_string_ascii( static const v8::CFunction fast_write_string_ascii(
diff --git a/src/node_external_reference.h b/src/node_external_reference.h
index 3bc7b2cab5a12e281058b79a7d0f734eb527986c..4218eaf365c739a4c04ca94e29d6d2a33a637d44 100644
--- a/src/node_external_reference.h
+++ b/src/node_external_reference.h
@@ -43,16 +43,16 @@ using CFunctionCallbackWithStrings =
const v8::FastOneByteString& base);
using CFunctionCallbackWithTwoUint8Arrays =
int32_t (*)(v8::Local<v8::Value>,
- const v8::FastApiTypedArray<uint8_t>&,
- const v8::FastApiTypedArray<uint8_t>&);
+ v8::Local<v8::Value>,
+ v8::Local<v8::Value>);
using CFunctionCallbackWithTwoUint8ArraysFallback =
bool (*)(v8::Local<v8::Value>,
- const v8::FastApiTypedArray<uint8_t>&,
- const v8::FastApiTypedArray<uint8_t>&,
+ v8::Local<v8::Value>,
+ v8::Local<v8::Value>,
v8::FastApiCallbackOptions&);
using CFunctionCallbackWithUint8ArrayUint32Int64Bool =
int32_t (*)(v8::Local<v8::Value>,
- const v8::FastApiTypedArray<uint8_t>&,
+ v8::Local<v8::Value>,
uint32_t,
int64_t,
bool);
@@ -73,18 +73,20 @@ using CFunctionWithBool = void (*)(v8::Local<v8::Value>,
using CFunctionWriteString =
uint32_t (*)(v8::Local<v8::Value> receiver,
- const v8::FastApiTypedArray<uint8_t>& dst,
+ v8::Local<v8::Value> dst,
const v8::FastOneByteString& src,
uint32_t offset,
- uint32_t max_length);
+ uint32_t max_length,
+ v8::FastApiCallbackOptions&);
using CFunctionBufferCopy =
uint32_t (*)(v8::Local<v8::Value> receiver,
- const v8::FastApiTypedArray<uint8_t>& source,
- const v8::FastApiTypedArray<uint8_t>& target,
+ v8::Local<v8::Value> source,
+ v8::Local<v8::Value> target,
uint32_t target_start,
uint32_t source_start,
- uint32_t to_copy);
+ uint32_t to_copy,
+ v8::FastApiCallbackOptions&);
// This class manages the external references from the V8 heap
// to the C++ addresses in Node.js.
diff --git a/src/util.h b/src/util.h diff --git a/src/util.h b/src/util.h
index 6376cf4f81113cdb2e3c179b800f1c79b51ab762..cc7ad99f981f564fba0395159d9d8b39901050ff 100644 index 6376cf4f81113cdb2e3c179b800f1c79b51ab762..cc7ad99f981f564fba0395159d9d8b39901050ff 100644
--- a/src/util.h --- a/src/util.h

View file

@ -6,7 +6,7 @@ Subject: Pass all globals through "require"
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62) (cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index d90476addb3f7cc2d0b8d8686386873894e75c25..e647bdda4624317615490cedd8d4edbcebbca8bc 100644 index 9b51e5bf4cdfbc8127efc7d5882581daa1cbd81f..aca7c36e9b566847228bd4f13f2c8237509207db 100644
--- a/lib/internal/modules/cjs/loader.js --- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js
@@ -200,6 +200,13 @@ const { @@ -200,6 +200,13 @@ const {
@ -23,7 +23,7 @@ index d90476addb3f7cc2d0b8d8686386873894e75c25..e647bdda4624317615490cedd8d4edbc
const { const {
isProxy, isProxy,
} = require('internal/util/types'); } = require('internal/util/types');
@@ -1725,10 +1732,12 @@ Module.prototype._compile = function(content, filename, format) { @@ -1683,10 +1690,12 @@ Module.prototype._compile = function(content, filename, format) {
if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) { if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) {
const { callAndPauseOnStart } = internalBinding('inspector'); const { callAndPauseOnStart } = internalBinding('inspector');
result = callAndPauseOnStart(compiledWrapper, thisValue, exports, result = callAndPauseOnStart(compiledWrapper, thisValue, exports,

View file

@ -18,7 +18,7 @@ This can be removed when Node.js upgrades to a version of V8 containing CLs
from the above issue. from the above issue.
diff --git a/src/api/environment.cc b/src/api/environment.cc diff --git a/src/api/environment.cc b/src/api/environment.cc
index 5b7f6e0609c8414c686d2d5ca603ea5c8bc484d0..6c9c81ff3c08fc28dc35578229a785521322b5dc 100644 index 9e1b8d147a99fda962d75c343d0687ffea3c9c69..244d747f010c51366e44dec705ae304423038a85 100644
--- a/src/api/environment.cc --- a/src/api/environment.cc
+++ b/src/api/environment.cc +++ b/src/api/environment.cc
@@ -313,6 +313,10 @@ Isolate* NewIsolate(Isolate::CreateParams* params, @@ -313,6 +313,10 @@ Isolate* NewIsolate(Isolate::CreateParams* params,
@ -47,7 +47,7 @@ index 5b7f6e0609c8414c686d2d5ca603ea5c8bc484d0..6c9c81ff3c08fc28dc35578229a78552
event_loop, event_loop,
platform, platform,
diff --git a/src/env.cc b/src/env.cc diff --git a/src/env.cc b/src/env.cc
index 400ff494f4e153408a2fce343d7b156d7ccefc7b..cac2d97323d131451eab4ca68ce771cb936447e4 100644 index b6ad3ca99c8b0c656ce726fbc3455ba554bc3bd1..0922f7fb9c120482b6ee825f5f1ad10dea11fe30 100644
--- a/src/env.cc --- a/src/env.cc
+++ b/src/env.cc +++ b/src/env.cc
@@ -577,14 +577,6 @@ IsolateData::IsolateData(Isolate* isolate, @@ -577,14 +577,6 @@ IsolateData::IsolateData(Isolate* isolate,

View file

@ -52,7 +52,7 @@ index 0d32d9f5a55da257a5e5a895a2ff002b780f96fe..9567d9499c62ea44cca651e87ab912ad
return &(wrapper_data_->cppgc_id); return &(wrapper_data_->cppgc_id);
} }
diff --git a/src/env.cc b/src/env.cc diff --git a/src/env.cc b/src/env.cc
index 99bd3e37853f99ecb2e45df373f17c10b3bd1561..400ff494f4e153408a2fce343d7b156d7ccefc7b 100644 index 63fdeeb26ba89284e74ca37050dfd170e7963331..b6ad3ca99c8b0c656ce726fbc3455ba554bc3bd1 100644
--- a/src/env.cc --- a/src/env.cc
+++ b/src/env.cc +++ b/src/env.cc
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@

View file

@ -12,10 +12,10 @@ branch of Node.js. This patch can be removed when Electron upgrades to
a stable Node release that contains the change. -- Charles) a stable Node release that contains the change. -- Charles)
diff --git a/src/crypto/crypto_timing.cc b/src/crypto/crypto_timing.cc diff --git a/src/crypto/crypto_timing.cc b/src/crypto/crypto_timing.cc
index 3d8ccc77b5952a999c5fe48792259d32b402c460..867a1c4aca54b9d41490d23a5eb55088b7e941cc 100644 index dbc46400501b61814d5be0ec1cb01b0dcd94e1d0..fe669d40c31a29334b047b9cfee3067f64ef0a7b 100644
--- a/src/crypto/crypto_timing.cc --- a/src/crypto/crypto_timing.cc
+++ b/src/crypto/crypto_timing.cc +++ b/src/crypto/crypto_timing.cc
@@ -59,7 +59,8 @@ bool FastTimingSafeEqual(Local<Value> receiver, @@ -60,7 +60,8 @@ bool FastTimingSafeEqual(Local<Value> receiver,
if (a.length() != b.length() || !a.getStorageIfAligned(&data_a) || if (a.length() != b.length() || !a.getStorageIfAligned(&data_a) ||
!b.getStorageIfAligned(&data_b)) { !b.getStorageIfAligned(&data_b)) {
TRACK_V8_FAST_API_CALL("crypto.timingSafeEqual.error"); TRACK_V8_FAST_API_CALL("crypto.timingSafeEqual.error");
@ -26,10 +26,10 @@ index 3d8ccc77b5952a999c5fe48792259d32b402c460..867a1c4aca54b9d41490d23a5eb55088
} }
diff --git a/src/histogram.cc b/src/histogram.cc diff --git a/src/histogram.cc b/src/histogram.cc
index 5641990e0bac455c33ddf7b9a865deba871516e7..bd757f42e02391abbeec007d9c4cea60bcdfa6a4 100644 index b655808e43d7c700ddeab7690e287bdbc9bfa50a..b0f7ae4e3af652c6dfe09f66d88485c5783f4037 100644
--- a/src/histogram.cc --- a/src/histogram.cc
+++ b/src/histogram.cc +++ b/src/histogram.cc
@@ -195,7 +195,8 @@ void HistogramBase::FastRecord(Local<Value> unused, @@ -187,7 +187,8 @@ void HistogramBase::FastRecord(Local<Value> unused,
const int64_t value, const int64_t value,
FastApiCallbackOptions& options) { FastApiCallbackOptions& options) {
if (value < 1) { if (value < 1) {
@ -39,26 +39,6 @@ index 5641990e0bac455c33ddf7b9a865deba871516e7..bd757f42e02391abbeec007d9c4cea60
return; return;
} }
HistogramBase* histogram; HistogramBase* histogram;
diff --git a/src/node_file.cc b/src/node_file.cc
index 37172158d318d6569194fd3c5441d107e155e54c..41498615a37945111348e22b18214c3bcc9533a0 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -1074,13 +1074,8 @@ static int32_t FastInternalModuleStat(
// NOLINTNEXTLINE(runtime/references) This is V8 api.
FastApiCallbackOptions& options) {
// This needs a HandleScope which needs an isolate.
- Isolate* isolate = Isolate::TryGetCurrent();
- if (!isolate) {
- options.fallback = true;
- return -1;
- }
-
- HandleScope scope(isolate);
+ Environment* env = Environment::GetCurrent(options.isolate);
+ HandleScope scope(env->isolate());
auto path = std::filesystem::path(input.data, input.data + input.length);
diff --git a/src/node_wasi.cc b/src/node_wasi.cc diff --git a/src/node_wasi.cc b/src/node_wasi.cc
index 090866960beb8f1759c99e95536924b8b61fb723..3f91b651b83a20e70d5b368e012f5ee4b9d16092 100644 index 090866960beb8f1759c99e95536924b8b61fb723..3f91b651b83a20e70d5b368e012f5ee4b9d16092 100644
--- a/src/node_wasi.cc --- a/src/node_wasi.cc

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. allowing them to be compatible with the V8_SANDBOXED_POINTERS feature.
diff --git a/src/api/environment.cc b/src/api/environment.cc diff --git a/src/api/environment.cc b/src/api/environment.cc
index df5fb942aa893c22d14d7eb21a5211a46a472a5f..5b7f6e0609c8414c686d2d5ca603ea5c8bc484d0 100644 index 50accbf4052da11d47a5200997f1098ed9d85354..9e1b8d147a99fda962d75c343d0687ffea3c9c69 100644
--- a/src/api/environment.cc --- a/src/api/environment.cc
+++ b/src/api/environment.cc +++ b/src/api/environment.cc
@@ -103,6 +103,14 @@ MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context, @@ -103,6 +103,14 @@ MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context,

View file

@ -7,7 +7,7 @@ Instead of disabling the tests, flag them as flaky so they still run
but don't cause CI failures on flakes. but don't cause CI failures on flakes.
diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status
index 8b9a4e80a08031085dde8a6952224e6ca3ca052e..2e83f166a34930083e697aaf06271e79cefe3f23 100644 index 6303908ce180db4d409707ae1f049319358642fb..d487497417e20c778dde57197dc18373799df36a 100644
--- a/test/parallel/parallel.status --- a/test/parallel/parallel.status
+++ b/test/parallel/parallel.status +++ b/test/parallel/parallel.status
@@ -5,6 +5,16 @@ prefix parallel @@ -5,6 +5,16 @@ prefix parallel
@ -28,7 +28,7 @@ index 8b9a4e80a08031085dde8a6952224e6ca3ca052e..2e83f166a34930083e697aaf06271e79
test-net-write-fully-async-hex-string: PASS, FLAKY test-net-write-fully-async-hex-string: PASS, FLAKY
# https://github.com/nodejs/node/issues/52273 # https://github.com/nodejs/node/issues/52273
diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status
index a3199b385dd99de57ac0fc25b1b3ecfebfcb5e61..725457846899583698ae37a8ba6088c694b09053 100644 index 6893abfe6e1c03d455099099f0d7e6b6930372a6..24aab3bad500ce4b9d43bf693c5efa6d563fe858 100644
--- a/test/sequential/sequential.status --- a/test/sequential/sequential.status
+++ b/test/sequential/sequential.status +++ b/test/sequential/sequential.status
@@ -7,6 +7,18 @@ prefix sequential @@ -7,6 +7,18 @@ prefix sequential

View file

@ -11,6 +11,7 @@
"parallel/test-crypto-aes-wrap", "parallel/test-crypto-aes-wrap",
"parallel/test-crypto-authenticated", "parallel/test-crypto-authenticated",
"parallel/test-crypto-authenticated-stream", "parallel/test-crypto-authenticated-stream",
"parallel/test-crypto-default-shake-lengths",
"parallel/test-crypto-des3-wrap", "parallel/test-crypto-des3-wrap",
"parallel/test-crypto-dh-group-setters", "parallel/test-crypto-dh-group-setters",
"parallel/test-crypto-dh-modp2", "parallel/test-crypto-dh-modp2",