Skip to content

Commit 6bb4a9f

Browse files
chore: bump node to v24.22.0 (43-x-y) (#55003)
* chore: bump node in DEPS to v24.22.0 * fix(patch): enable the V8 sandbox in shared-cage builds Upstream now enables the V8 sandbox only for shared-cage builds. Keep Electron's behaviour of enabling it whenever pointer compression is on, matching Chromium's V8. The unofficial.gni x86 hunk landed upstream. Ref: nodejs/node#62237 Ref: nodejs/node#65491 * fix(patch): use names for asymmetric key algorithms Upstream dropped the BoringSSL guard in DhKeyGenTraits::Setup(), removed ReadASN1Element() from ncrypto, and no longer includes <openssl/evp.h> from env.h, so those hunks are no longer needed. Ref: nodejs/node#65966 Ref: nodejs/node#66108 Ref: nodejs/node#65484 * fix(patch): skip RSA-PSS keygen deprecation tests with BoringSSL The skip is now upstream. Ref: nodejs/node#65808 * fix(patch): detach cppgc wrappers from their Realm before it is freed Upstream's CppgcWrapperList::Cleanup() now pops nodes itself and the wrapper owns and frees its list node, so the local PopFront/delete hunk is dropped. Ref: nodejs/node#65778 * fix(patch): gate jspi flag on V8_ENABLE_WEBASSEMBLY Ref: nodejs/node#66082 * chore: remove upstreamed patches - nodejs/node#63985 - nodejs/node#65630 - nodejs/node#64453 - nodejs/node#65778 * chore: update patches (trivial only) * chore: update filenames.auto.gni * fix(patch): discover hashes from OpenSSL providers ncrypto's DigestCache::aliases() now has a function-local static, so ncrypto needs the no_exit_time_destructors config too. Ref: nodejs/node#65484 * fix(patch): read the peer certificate chain without consuming it sk_X509_num() returns size_t in BoringSSL. Ref: nodejs/node#65602 * chore: update patches (trivial only) * node#65820: src: fix null pointer call when running without a startup snapshot SnapshotData::AsEmbedderWrapper() was removed. Both call sites wrap the embedded snapshot, so use EmbedderSnapshotData::BuiltinSnapshotData(). Ref: nodejs/node#65820 * node#65407: src: apply IsolateSettings when using a snapshot node::CreateEnvironment() no longer installs the per-isolate message listener when it builds the environment from a snapshot, so stop compensating for that and let SetIsolateUpForNode() add it. Ref: nodejs/node#65407 * test: drop removed wasm rab integration flag from webidl buffer source test Chromium's V8 removed --experimental-wasm-rab-integration after shipping it; the new test-internal-webidl-buffer-source.js passes it. Ref: nodejs/node#65845 Ref: https://chromium-review.googlesource.com/c/v8/v8/+/7708297 * chore: remove obsolete TLS external-memory accounting patch Upstream moved the SecureContext external-memory Increase() into Init() and guards the Decrease() on ctx_, so the leak this patch fixed is gone. The patch's removal of that guard now double-decrements when v24.22.0's TLSSocket closes a single-use context before the wrapper is destroyed, tripping V8's ExternalMemoryAccounter DCHECK in every TLS test. Already dropped on main in #53524. * test: skip new rmSync permission error test when the Node suite runs as root test-fs-rmSync-special-char-additional-error.js is new in v24.22.0 and relies on a read-only directory blocking removal, which root bypasses; the Linux Node.js test job runs as root. Ref: nodejs/node#64453 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Sam Attard <sattard@anthropic.com>
1 parent 3ca0cad commit 6bb4a9f

51 files changed

Lines changed: 300 additions & 1315 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎DEPS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vars = {
44
'chromium_version':
55
'150.0.7871.250',
66
'node_version':
7-
'v24.21.0',
7+
'v24.22.0',
88
'nan_version':
99
'675cefebca42410733da8a454c8d9391fcebfbc2',
1010
'squirrel.mac_version':

‎filenames.auto.gni‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ auto_filenames = {
212212
"../third_party/electron_node/src/crypto/crypto_bio.h",
213213
"../third_party/electron_node/src/crypto/crypto_chacha20_poly1305.h",
214214
"../third_party/electron_node/src/crypto/crypto_cipher.h",
215-
"../third_party/electron_node/src/crypto/crypto_clienthello-inl.h",
216-
"../third_party/electron_node/src/crypto/crypto_clienthello.h",
217215
"../third_party/electron_node/src/crypto/crypto_common.h",
218216
"../third_party/electron_node/src/crypto/crypto_context.h",
219217
"../third_party/electron_node/src/crypto/crypto_dh.h",
@@ -226,7 +224,9 @@ auto_filenames = {
226224
"../third_party/electron_node/src/crypto/crypto_keygen.h",
227225
"../third_party/electron_node/src/crypto/crypto_keys.h",
228226
"../third_party/electron_node/src/crypto/crypto_kmac.h",
227+
"../third_party/electron_node/src/crypto/crypto_mac.h",
229228
"../third_party/electron_node/src/crypto/crypto_pbkdf2.h",
229+
"../third_party/electron_node/src/crypto/crypto_pkcs12.h",
230230
"../third_party/electron_node/src/crypto/crypto_pqc.h",
231231
"../third_party/electron_node/src/crypto/crypto_random.h",
232232
"../third_party/electron_node/src/crypto/crypto_rsa.h",

‎patches/node/.patches‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ chore_exclude_electron_node_folder_from_exit-time-destructors.patch
3131
api_remove_deprecated_getisolate.patch
3232
fix_redefined_macos_sdk_header_symbols.patch
3333
feat_disable_js_source_phase_imports_by_default.patch
34-
fix_avoid_external_memory_leak_on_invalid_tls_protocol_versions.patch
3534
api_delete_deprecated_fields_on_v8_isolate.patch
3635
api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch
3736
fix_ensure_traverseparent_bails_on_resource_path_exit.patch
@@ -61,9 +60,6 @@ test_account_for_libc_rm_error_on_electron_linux.patch
6160
fix_use_embedder_perfetto_client_when_available.patch
6261
src_fix_external_reference_registration_for_new_cfunction_lifetime.patch
6362
fix_do_not_pass_removed_jspi_v8_flag.patch
64-
src_keep_global_list_of_addon-provided_cleanup_hooks.patch
65-
src_fix_use-after-free_in_cleanuphookthunkrun.patch
66-
test_add_regression_test_for_cleanup_hook_uaf.patch
6763
fix_allow_electron_s_linked_bindings_under_the_permission_model.patch
68-
fs_support_removing_read-only_files_in_rmsync_on_windows.patch
69-
src_detach_cppgc_wrappers_from_their_realm_before_it_is_freed.patch
64+
test_drop_removed_wasm_rab_integration_flag.patch
65+
test_skip_rmsync_permission_error_test_when_running_as_root.patch

‎patches/node/api_delete_deprecated_fields_on_v8_isolate.patch‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Subject: Delete deprecated fields on v8::Isolate
66
https://chromium-review.googlesource.com/c/v8/v8/+/7081397
77

88
diff --git a/src/api/environment.cc b/src/api/environment.cc
9-
index ea8ba25085c12f6180c879f19e543a8151e3792d..90d40720a4faad865cf6584bee73e5739d534f36 100644
9+
index 51b7607854b77ceeb3f9e977ce15594cdb4eaeca..6313d5ce1839fafb175c0e0c74eb39445baed467 100644
1010
--- a/src/api/environment.cc
1111
+++ b/src/api/environment.cc
1212
@@ -219,8 +219,6 @@ void SetIsolateCreateParamsForNode(Isolate::CreateParams* params) {

‎patches/node/api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ index 5f04e7085f4246b673f8ea629d03cc8b02e93f2a..60d61aef3f8db2e1d43096de580c5127
7272

7373
inline Environment* Environment::GetCurrent(
7474
diff --git a/src/histogram.cc b/src/histogram.cc
75-
index 7127bb80cc8fa3ecf3d618358bfd7d53dc8b591e..41c3528529b970a319f9c2baab51eb0b801a7fc0 100644
75+
index 30a095b3c43c015d8569f65362b6b3b619290f7f..2e649644acf7aff3be059cd8ec1c96235d2d44e6 100644
7676
--- a/src/histogram.cc
7777
+++ b/src/histogram.cc
78-
@@ -755,7 +755,8 @@ HistogramBase::HistogramBase(
78+
@@ -1873,7 +1873,8 @@ HistogramBase::HistogramBase(Environment* env,
7979
MakeWeak();
8080
wrap->SetAlignedPointerInInternalField(
8181
HistogramImpl::InternalFields::kImplField,
@@ -84,8 +84,8 @@ index 7127bb80cc8fa3ecf3d618358bfd7d53dc8b591e..41c3528529b970a319f9c2baab51eb0b
8484
+ v8::kEmbedderDataTypeTagDefault);
8585
}
8686

87-
HistogramBase::HistogramBase(
88-
@@ -767,7 +768,8 @@ HistogramBase::HistogramBase(
87+
HistogramBase::HistogramBase(Environment* env,
88+
@@ -1883,7 +1884,8 @@ HistogramBase::HistogramBase(Environment* env,
8989
MakeWeak();
9090
wrap->SetAlignedPointerInInternalField(
9191
HistogramImpl::InternalFields::kImplField,
@@ -95,7 +95,7 @@ index 7127bb80cc8fa3ecf3d618358bfd7d53dc8b591e..41c3528529b970a319f9c2baab51eb0b
9595
}
9696

9797
void HistogramBase::MemoryInfo(MemoryTracker* tracker) const {
98-
@@ -1022,7 +1024,8 @@ IntervalHistogram::IntervalHistogram(Environment* env,
98+
@@ -2387,7 +2389,8 @@ IntervalHistogram::IntervalHistogram(Environment* env,
9999
MakeWeak();
100100
wrap->SetAlignedPointerInInternalField(
101101
HistogramImpl::InternalFields::kImplField,
@@ -105,7 +105,7 @@ index 7127bb80cc8fa3ecf3d618358bfd7d53dc8b591e..41c3528529b970a319f9c2baab51eb0b
105105
uv_timer_init(env->event_loop(), &timer_);
106106
}
107107

108-
@@ -1114,7 +1117,8 @@ IterationHistogram::IterationHistogram(Environment* env,
108+
@@ -2479,7 +2482,8 @@ IterationHistogram::IterationHistogram(Environment* env,
109109
MakeWeak();
110110
wrap->SetAlignedPointerInInternalField(
111111
HistogramImpl::InternalFields::kImplField,
@@ -115,7 +115,7 @@ index 7127bb80cc8fa3ecf3d618358bfd7d53dc8b591e..41c3528529b970a319f9c2baab51eb0b
115115
uv_check_init(env->event_loop(), &check_handle_);
116116
uv_prepare_init(env->event_loop(), &prepare_handle_);
117117
uv_unref(reinterpret_cast<uv_handle_t*>(&check_handle_));
118-
@@ -1595,7 +1599,8 @@ HistogramImpl* HistogramImpl::FromJSObject(Local<Value> value) {
118+
@@ -3056,7 +3060,8 @@ HistogramImpl* HistogramImpl::FromJSObject(Local<Value> value) {
119119
auto obj = value.As<Object>();
120120
DCHECK_GE(obj->InternalFieldCount(), HistogramImpl::kInternalFieldCount);
121121
return static_cast<HistogramImpl*>(
@@ -203,7 +203,7 @@ index d4dd93d084d5e58f0c18ef82a51d25be4643ba7a..2709cdb31869d9e030c654d975b07967
203203

204204
void BindingData::MemoryInfo(MemoryTracker* tracker) const {
205205
diff --git a/src/node_realm-inl.h b/src/node_realm-inl.h
206-
index 0af487a9abc9ee1783367ac86b0016ab89e02006..c01cef477aaba52f9894943acede7fb22ed17dcb 100644
206+
index d527a4d4c620a30377ce2c0cdb0ff0cb6a11ec66..97756edfce15b2f3647646146683727b36c0eec3 100644
207207
--- a/src/node_realm-inl.h
208208
+++ b/src/node_realm-inl.h
209209
@@ -22,7 +22,8 @@ inline Realm* Realm::GetCurrent(v8::Local<v8::Context> context) {
@@ -217,7 +217,7 @@ index 0af487a9abc9ee1783367ac86b0016ab89e02006..c01cef477aaba52f9894943acede7fb2
217217

218218
inline Realm* Realm::GetCurrent(
219219
diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc
220-
index c3e995adf437413fe956e45c2ccc704d8737de59..8561933060ac30e3559d7ce2ac633d25f1e4d6ec 100644
220+
index e773fb1ed4e777667fa677b402b20d676e9af4a2..e915e257259aac0ed21f101e537230f448d0402f 100644
221221
--- a/src/node_snapshotable.cc
222222
+++ b/src/node_snapshotable.cc
223223
@@ -1461,7 +1461,8 @@ StartupData SerializeNodeContextInternalFields(Local<Object> holder,

0 commit comments

Comments
 (0)