From d9d12f7a7882b0ce31c6741044dbe841e875b823 Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 13 May 2021 05:19:55 +0000 Subject: [PATCH] update patches --- patches/node/.patches | 3 -- patches/node/build_add_gn_build_files.patch | 8 +-- ...de_entrypoint_to_be_a_builtin_module.patch | 8 +-- ...is_on_64bit_arch_and_ptr_compression.patch | 2 +- .../feat_add_uv_loop_watcher_queue_code.patch | 12 ++--- .../node/feat_initialize_asar_support.patch | 6 +-- ...nter-types-discards-qualifiers_error.patch | 4 +- ...r_enable_lto_and_build_v8_with_gn_in.patch | 2 +- ...ationscopes_for_sigint_interruptions.patch | 39 -------------- ...everse_jsargs_defines_in_common_gypi.patch | 2 +- ...reventing_initializeinspector_in_env.patch | 6 +-- ...ment_out_incompatible_crypto_modules.patch | 16 +++--- .../fix_crypto_tests_to_run_with_bssl.patch | 2 +- ..._tostring_behavior_in_v8_serdes_test.patch | 4 +- ..._apis_are_not_available_in_boringssl.patch | 8 +-- ...ated_--experimental-wasm-bigint_flag.patch | 2 +- ...s_has_been_removed_remove_from_specs.patch | 19 ------- .../fix_use_crypto_impls_for_compat.patch | 4 +- .../make_module_globalpaths_a_reference.patch | 4 +- .../node-api_faster_threadsafe_function.patch | 2 +- .../pass_all_globals_through_require.patch | 4 +- ...dder_overriding_of_internal_fs_calls.patch | 6 +-- ...cess_fork_to_use_execute_script_with.patch | 4 +- ...l_case_for_uncached_internal_strings.patch | 51 ------------------- 24 files changed, 53 insertions(+), 165 deletions(-) delete mode 100644 patches/node/fix_add_safeforterminationscopes_for_sigint_interruptions.patch delete mode 100644 patches/node/fix_the_--harmony-weak-refs_has_been_removed_remove_from_specs.patch delete mode 100644 patches/node/remove_makeexternal_case_for_uncached_internal_strings.patch diff --git a/patches/node/.patches b/patches/node/.patches index 22747c42c8e59..5ee557b9d8a89 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -27,12 +27,9 @@ fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch fix_allow_preventing_initializeinspector_in_env.patch src_allow_embedders_to_provide_a_custom_pageallocator_to.patch allow_preventing_preparestacktracecallback.patch -fix_add_safeforterminationscopes_for_sigint_interruptions.patch -remove_makeexternal_case_for_uncached_internal_strings.patch fix_remove_outdated_--experimental-wasm-bigint_flag.patch fix_crypto_tests_to_run_with_bssl.patch build_add_mjs_support_to_js2c.patch src_inline_asynccleanuphookhandle_in_headers.patch fix_handle_new_tostring_behavior_in_v8_serdes_test.patch -fix_the_--harmony-weak-refs_has_been_removed_remove_from_specs.patch node-api_faster_threadsafe_function.patch diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index c9c811d769cac..981a3bf07cc71 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -1395,10 +1395,10 @@ index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c + ] +} diff --git a/node.gyp b/node.gyp -index f18a0d58a84c798abc946d2b389987009f80fa2d..4f13c5b2d4e9e22f37dab47cd44b475f515ebe97 100644 +index 61b789ec74ab554648164875d540f34c09ffc116..753f135322a007b3b9d330ccd4101cc18b454e58 100644 --- a/node.gyp +++ b/node.gyp -@@ -235,17 +235,17 @@ +@@ -238,17 +238,17 @@ 'lib/internal/streams/state.js', 'lib/internal/streams/pipeline.js', 'lib/internal/streams/end-of-stream.js', @@ -1633,7 +1633,7 @@ index 0000000000000000000000000000000000000000..d1d6b51e8c0c5bc6a5d09e217eb30483 + args = rebase_path(inputs + outputs, root_build_dir) +} diff --git a/src/node_version.h b/src/node_version.h -index 15dae3ef318d8afd33ea2e8ced41bbdf80724b83..e3856f950cc68bd34966acf8f181eec38fe40691 100644 +index 5419747db7b6504ad9d61b1cd3d53d93913e360f..e51bf333b77e67af188a3d352ca22b12d939e412 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ @@ -1772,7 +1772,7 @@ index 0000000000000000000000000000000000000000..3088ae4bdf814ae255c9805ebd393b2e + + out_file.writelines(new_contents) diff --git a/tools/install.py b/tools/install.py -index 729b416fc47d3ff3317ae3671dee977c719a8841..530ca7d441d3b65d4e4fac7dd5880afe56aa3807 100755 +index 693faff4c37ac4d83a47e818f4412900497a2b62..7ab58f7cba6f210e4b7829257fb87e26a091cc89 100755 --- a/tools/install.py +++ b/tools/install.py @@ -159,8 +159,8 @@ def files(action): diff --git a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch index 77abbce5a4dbd..42bffadc0e550 100644 --- a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch +++ b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch @@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form of this. diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js -index af69dfc9e71b54a9d7eda0daa498396008aba610..f52e8a09f689bafcfdca39e71822ff3cbf898349 100644 +index a66ac87237ad1de85318be58d15b508be568cf1f..62553011f9fd16dbaccd8d7e8eecee627be7137c 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -95,10 +95,12 @@ function patchProcessObject(expandArgv1) { +@@ -89,10 +89,12 @@ function patchProcessObject(expandArgv1) { if (expandArgv1 && process.argv[1] && !StringPrototypeStartsWith(process.argv[1], '-')) { // Expand process.argv[1] into a full path. @@ -29,10 +29,10 @@ index af69dfc9e71b54a9d7eda0daa498396008aba610..f52e8a09f689bafcfdca39e71822ff3c // TODO(joyeecheung): most of these should be deprecated and removed, diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index 541c18d8032c5247433367f9e04c946cf203d475..b04e3f1fc56a86abe18f924e4d9b7fb517aea74d 100644 +index e2a205739ce89820fe5f1f24e609ff16b86afb04..db6980d387ed399671957170266e2a01c04fae9a 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js -@@ -1037,6 +1037,13 @@ Module.prototype._compile = function(content, filename) { +@@ -1042,6 +1042,13 @@ Module.prototype._compile = function(content, filename) { if (getOptionValue('--inspect-brk') && process._eval == null) { if (!resolvedArgv) { // We enter the repl if we're not given a filename argument. diff --git a/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch b/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch index 860a6ab4b5a63..7fbfff605b021 100644 --- a/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch +++ b/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch @@ -8,7 +8,7 @@ node modules will have different (wrong) ideas about how v8 structs are laid out in memory on 64-bit machines, and will summarily fail to work. diff --git a/common.gypi b/common.gypi -index d37d29736ead82aca6c89cc7625ca4d9a053da32..b6aa3c0504fd108ada368d30f3021d1c171a4879 100644 +index 3f305b39cb35a1a36a54cff80476fecba1556d5d..cd56b9b314823ff48c1a599ec51c6a3077b62f98 100644 --- a/common.gypi +++ b/common.gypi @@ -64,7 +64,7 @@ diff --git a/patches/node/feat_add_uv_loop_watcher_queue_code.patch b/patches/node/feat_add_uv_loop_watcher_queue_code.patch index 793221421c9ca..d5a78f7b72332 100644 --- a/patches/node/feat_add_uv_loop_watcher_queue_code.patch +++ b/patches/node/feat_add_uv_loop_watcher_queue_code.patch @@ -6,10 +6,10 @@ Subject: feat: add uv_loop watcher_queue code Electron's Node Integration works by listening to Node's backend file descriptor in a separate thread; when an event is ready the backend file descriptor will trigger a new event for it, and the main thread will then iterate the libuv loop. For certain operations (ex. adding a timeout task) the backend file descriptor isn't informed, & as a result the main thread doesn't know it needs to iterate the libuv loop so the timeout task will never execute until something else trigger a new event. This commit should be removed when https://github.com/libuv/libuv/pull/1921 is merged diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h -index 2557961eedba7f8ab5d5a058859613910e3bb382..72fe36fdc8978c6cb9913f353ea97fb4027ad492 100644 +index 1e1fc94bfcc3dca90620d09fab1fe60060e17056..253f23e14d09a8c8d5c51545f71b7f03f064dbd6 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h -@@ -1780,6 +1780,8 @@ union uv_any_req { +@@ -1789,6 +1789,8 @@ union uv_any_req { struct uv_loop_s { /* User data - use this for whatever. */ void* data; @@ -19,7 +19,7 @@ index 2557961eedba7f8ab5d5a058859613910e3bb382..72fe36fdc8978c6cb9913f353ea97fb4 unsigned int active_handles; void* handle_queue[2]; diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c -index 1597828c868b383439f7442a3f22eee5d6ac539d..a0fbc07a21c66cc91b7b342640e5bc4ba579fd78 100644 +index 63f268f795f10072fe1c430d1242e3774bf9eea9..2811f063eef7329f87fbe43b28729c6b25f0a75b 100644 --- a/deps/uv/src/unix/core.c +++ b/deps/uv/src/unix/core.c @@ -897,8 +897,11 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) { @@ -35,8 +35,8 @@ index 1597828c868b383439f7442a3f22eee5d6ac539d..a0fbc07a21c66cc91b7b342640e5bc4b if (loop->watchers[w->fd] == NULL) { loop->watchers[w->fd] = w; -@@ -934,8 +937,11 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) { - w->events = 0; +@@ -933,8 +936,11 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) { + loop->nfds--; } } - else if (QUEUE_EMPTY(&w->watcher_queue)) @@ -48,7 +48,7 @@ index 1597828c868b383439f7442a3f22eee5d6ac539d..a0fbc07a21c66cc91b7b342640e5bc4b } -@@ -952,6 +958,8 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) { +@@ -951,6 +957,8 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) { void uv__io_feed(uv_loop_t* loop, uv__io_t* w) { if (QUEUE_EMPTY(&w->pending_queue)) QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue); diff --git a/patches/node/feat_initialize_asar_support.patch b/patches/node/feat_initialize_asar_support.patch index 01f48b1ba4cda..e3446f61ddb0e 100644 --- a/patches/node/feat_initialize_asar_support.patch +++ b/patches/node/feat_initialize_asar_support.patch @@ -6,10 +6,10 @@ Subject: feat: initialize asar support This patch initializes asar support in Node.js. diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js -index c76add4621b614dd7dd4f4d369fb6ce7598ee22d..af69dfc9e71b54a9d7eda0daa498396008aba610 100644 +index dfd7249e907ebcc0aa0e511b96435507af3f90aa..a66ac87237ad1de85318be58d15b508be568cf1f 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -75,6 +75,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { +@@ -69,6 +69,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { assert(!CJSLoader.hasLoadedAnyUserCJSModule); loadPreloadModules(); initializeFrozenIntrinsics(); @@ -17,7 +17,7 @@ index c76add4621b614dd7dd4f4d369fb6ce7598ee22d..af69dfc9e71b54a9d7eda0daa4983960 } function patchProcessObject(expandArgv1) { -@@ -450,6 +451,10 @@ function loadPreloadModules() { +@@ -468,6 +469,10 @@ function loadPreloadModules() { } } diff --git a/patches/node/fix_-wincompatible-pointer-types-discards-qualifiers_error.patch b/patches/node/fix_-wincompatible-pointer-types-discards-qualifiers_error.patch index 495c3f67fbe83..702435846235d 100644 --- a/patches/node/fix_-wincompatible-pointer-types-discards-qualifiers_error.patch +++ b/patches/node/fix_-wincompatible-pointer-types-discards-qualifiers_error.patch @@ -8,10 +8,10 @@ Fixes an 'assigment to 'char *' from 'const char *'' error in libuv. This will be upstreamed. diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c -index 8a801749d472b041fa4472a84e8499cf02b29fc4..99b30f579763e068d907dd17c21ce22265b6bf6f 100644 +index a083b5e82c8c4294d45a65ab4d01fa3ceb650cdd..5eaaee3b0c6a5f52e10b5749eae4b21c5c059322 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c -@@ -1242,8 +1242,8 @@ void fs__mktemp(uv_fs_t* req, uv__fs_mktemp_func func) { +@@ -1237,8 +1237,8 @@ void fs__mktemp(uv_fs_t* req, uv__fs_mktemp_func func) { size_t len; uint64_t v; char* path; diff --git a/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch b/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch index c1e5abdf80eb8..4e69236c7f958 100644 --- a/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch +++ b/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch @@ -8,7 +8,7 @@ common.gypi is a file that's included in the node header bundle, despite the fact that we do not build node with gyp. diff --git a/common.gypi b/common.gypi -index e610650a01d4ab39f9595d11aac7f49d62bd27b7..d37d29736ead82aca6c89cc7625ca4d9a053da32 100644 +index aa4279d93ca35c83ad8c417a11292ef5ca91c495..3f305b39cb35a1a36a54cff80476fecba1556d5d 100644 --- a/common.gypi +++ b/common.gypi @@ -81,6 +81,22 @@ diff --git a/patches/node/fix_add_safeforterminationscopes_for_sigint_interruptions.patch b/patches/node/fix_add_safeforterminationscopes_for_sigint_interruptions.patch deleted file mode 100644 index b26956c60e20c..0000000000000 --- a/patches/node/fix_add_safeforterminationscopes_for_sigint_interruptions.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Thu, 10 Dec 2020 14:39:33 -0800 -Subject: fix: add SafeForTerminationScopes for SIGINT interruptions -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We start Node.js with only_terminate_in_safe_scope set to true becuase -it's set by gin’s IsolateHolder. In those cases, parts of the API that -expect execution termination to happen need to be marked as able to -receive those events. - -Upstreamed at https://github.com/nodejs/node/pull/36344. - -diff --git a/src/module_wrap.cc b/src/module_wrap.cc -index f778b089dc4009912361342077793e7918286de3..9302fa6f68d83717a02b82891466ce12b6af2cfd 100644 ---- a/src/module_wrap.cc -+++ b/src/module_wrap.cc -@@ -350,6 +350,7 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo& args) { - - ShouldNotAbortOnUncaughtScope no_abort_scope(env); - TryCatchScope try_catch(env); -+ Isolate::SafeForTerminationScope safe_for_termination(env->isolate()); - - bool timed_out = false; - bool received_signal = false; -diff --git a/src/node_contextify.cc b/src/node_contextify.cc -index 848e883a829a9725649d837bff09b30156f4f661..a69570400cd897699b1033102767b3389ff8ef38 100644 ---- a/src/node_contextify.cc -+++ b/src/node_contextify.cc -@@ -933,6 +933,7 @@ bool ContextifyScript::EvalMachine(Environment* env, - return false; - } - TryCatchScope try_catch(env); -+ Isolate::SafeForTerminationScope safe_for_termination(env->isolate()); - ContextifyScript* wrapped_script; - ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.Holder(), false); - Local unbound_script = diff --git a/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch b/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch index 2678bc7228652..e236f953ecb81 100644 --- a/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch +++ b/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch @@ -6,7 +6,7 @@ Subject: fix: add v8_enable_reverse_jsargs defines in common.gypi This can be removed once node upgrades V8 and inevitably has to do this exact same thing. Also hi node people if you are looking at this. diff --git a/common.gypi b/common.gypi -index b6aa3c0504fd108ada368d30f3021d1c171a4879..9a2552ab3c1ba44b57b2d3b1ddf2becaa32ebbda 100644 +index cd56b9b314823ff48c1a599ec51c6a3077b62f98..709943635ad31da1c7a7ef91d2f3bfbeb78ea937 100644 --- a/common.gypi +++ b/common.gypi @@ -65,6 +65,7 @@ diff --git a/patches/node/fix_allow_preventing_initializeinspector_in_env.patch b/patches/node/fix_allow_preventing_initializeinspector_in_env.patch index 85b2d755f5533..af64960cefece 100644 --- a/patches/node/fix_allow_preventing_initializeinspector_in_env.patch +++ b/patches/node/fix_allow_preventing_initializeinspector_in_env.patch @@ -36,7 +36,7 @@ index 53b07052e43a09f29f863ee1b2287bdebe7b7a7f..c08fe4b32d4155badb572f15529f903c #endif diff --git a/src/env-inl.h b/src/env-inl.h -index c1853f81b68bd22d20fb99877f4c500a384e9545..578552c0d66f9fd09405d80376d5f97d812018ee 100644 +index 9b2f82cc00e661f139611dd2de53598d6d8ff210..006bcaf4a9a864438cd447dc4235b3a5257cd2a5 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -829,6 +829,10 @@ inline bool Environment::tracks_unmanaged_fds() const { @@ -51,10 +51,10 @@ index c1853f81b68bd22d20fb99877f4c500a384e9545..578552c0d66f9fd09405d80376d5f97d return emit_filehandle_warning_; } diff --git a/src/env.h b/src/env.h -index f89365a1aa7ffacbb423e01a68f484992751f76f..5e5818eaed3cd4435f1e6b908e95c5953c8743f2 100644 +index 9c435f12db0e2d0a13ebd2b01810f0857c55fe2e..1ea1caf0e327719c39f91ce3c0897dde5034c904 100644 --- a/src/env.h +++ b/src/env.h -@@ -1020,6 +1020,7 @@ class Environment : public MemoryRetainer { +@@ -1026,6 +1026,7 @@ class Environment : public MemoryRetainer { inline bool owns_process_state() const; inline bool owns_inspector() const; inline bool tracks_unmanaged_fds() const; diff --git a/patches/node/fix_comment_out_incompatible_crypto_modules.patch b/patches/node/fix_comment_out_incompatible_crypto_modules.patch index 5337b750eb0c6..abcf45a0bd3a6 100644 --- a/patches/node/fix_comment_out_incompatible_crypto_modules.patch +++ b/patches/node/fix_comment_out_incompatible_crypto_modules.patch @@ -9,10 +9,10 @@ with what's exposed through BoringSSL. I plan to upstream parts of this or otherwise introduce shims to reduce friction. diff --git a/src/node_crypto.cc b/src/node_crypto.cc -index d7b6dbd85d6ef97370affde54bde4657f2413a06..489123d5fbd340fdceb3b6316e3fca6fb1050fef 100644 +index c0baf86802a67f00830c81d325f448bcea7d4e40..c2fd0f94eeb1aeaecdb18e80268ef1fb84c5c8c2 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc -@@ -5204,11 +5204,11 @@ bool DiffieHellman::Init(int primeLength, int g) { +@@ -5207,11 +5207,11 @@ bool DiffieHellman::Init(int primeLength, int g) { bool DiffieHellman::Init(const char* p, int p_len, int g) { dh_.reset(DH_new()); if (p_len <= 0) { @@ -26,7 +26,7 @@ index d7b6dbd85d6ef97370affde54bde4657f2413a06..489123d5fbd340fdceb3b6316e3fca6f return false; } BIGNUM* bn_p = -@@ -5227,18 +5227,18 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) { +@@ -5230,18 +5230,18 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) { bool DiffieHellman::Init(const char* p, int p_len, const char* g, int g_len) { dh_.reset(DH_new()); if (p_len <= 0) { @@ -48,7 +48,7 @@ index d7b6dbd85d6ef97370affde54bde4657f2413a06..489123d5fbd340fdceb3b6316e3fca6f return false; } BIGNUM* bn_p = -@@ -5731,7 +5731,7 @@ void ECDH::SetPrivateKey(const FunctionCallbackInfo& args) { +@@ -5734,7 +5734,7 @@ void ECDH::SetPrivateKey(const FunctionCallbackInfo& args) { if (!EC_KEY_set_public_key(new_key.get(), pub.get())) return env->ThrowError("Failed to set generated public key"); @@ -57,7 +57,7 @@ index d7b6dbd85d6ef97370affde54bde4657f2413a06..489123d5fbd340fdceb3b6316e3fca6f ecdh->group_ = EC_KEY_get0_group(ecdh->key_.get()); } -@@ -6219,6 +6219,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { +@@ -6222,6 +6222,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { EVPKeyCtxPointer Setup() override { EVPKeyPointer params; if (prime_info_.fixed_value_) { @@ -65,7 +65,7 @@ index d7b6dbd85d6ef97370affde54bde4657f2413a06..489123d5fbd340fdceb3b6316e3fca6f DHPointer dh(DH_new()); if (!dh) return nullptr; -@@ -6235,6 +6236,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { +@@ -6238,6 +6239,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { params = EVPKeyPointer(EVP_PKEY_new()); CHECK(params); EVP_PKEY_assign_DH(params.get(), dh.release()); @@ -73,7 +73,7 @@ index d7b6dbd85d6ef97370affde54bde4657f2413a06..489123d5fbd340fdceb3b6316e3fca6f } else { EVPKeyCtxPointer param_ctx(EVP_PKEY_CTX_new_id(EVP_PKEY_DH, nullptr)); if (!param_ctx) -@@ -6242,7 +6244,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { +@@ -6245,7 +6247,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { if (EVP_PKEY_paramgen_init(param_ctx.get()) <= 0) return nullptr; @@ -82,7 +82,7 @@ index d7b6dbd85d6ef97370affde54bde4657f2413a06..489123d5fbd340fdceb3b6316e3fca6f if (EVP_PKEY_CTX_set_dh_paramgen_prime_len(param_ctx.get(), prime_info_.prime_size_) <= 0) return nullptr; -@@ -6250,7 +6252,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { +@@ -6253,7 +6255,7 @@ class DHKeyPairGenerationConfig : public KeyPairGenerationConfig { if (EVP_PKEY_CTX_set_dh_paramgen_generator(param_ctx.get(), generator_) <= 0) return nullptr; diff --git a/patches/node/fix_crypto_tests_to_run_with_bssl.patch b/patches/node/fix_crypto_tests_to_run_with_bssl.patch index 7ee5238bf2de1..9402dc2436432 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -361,7 +361,7 @@ index ce4e2922de806276586796e2b3abdb885fc99840..4a92a134291964003fe50a3a9fec9d3e } diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js -index f51ffba042421a62aba455ec8aa786a444aed3fc..4a1338f1dab9832dcd9f98e1b82ec527d5813d44 100644 +index 8a5fd21eea511ecd60aa99ca1ba5c592cd5028fa..d165256887abd6f10a8ff89076e8ae528725d074 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -41,7 +41,7 @@ for (const bits of [-1, 0, 1]) { diff --git a/patches/node/fix_handle_new_tostring_behavior_in_v8_serdes_test.patch b/patches/node/fix_handle_new_tostring_behavior_in_v8_serdes_test.patch index fd291cf0a6403..a3b409fcc1492 100644 --- a/patches/node/fix_handle_new_tostring_behavior_in_v8_serdes_test.patch +++ b/patches/node/fix_handle_new_tostring_behavior_in_v8_serdes_test.patch @@ -6,10 +6,10 @@ Subject: fix: handle new ToString() behavior in v8 serdes test Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2739980 diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js -index 593fb34ad7359419a886df4492d36715357a0905..3eeb1b45a9d14f97fc61f4c308b0538c65230275 100644 +index f080f551396c8bb27e16448babecca2f2ad18a2b..d7304e6255648bd19c66012b55b93598d5ffa66d 100644 --- a/test/parallel/test-v8-serdes.js +++ b/test/parallel/test-v8-serdes.js -@@ -54,7 +54,7 @@ const deserializerTypeError = +@@ -50,7 +50,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); { const ser = new v8.DefaultSerializer(); ser._getDataCloneError = common.mustCall((message) => { diff --git a/patches/node/fix_key_gen_apis_are_not_available_in_boringssl.patch b/patches/node/fix_key_gen_apis_are_not_available_in_boringssl.patch index 9d39dcc812e8e..bf7336771c0f6 100644 --- a/patches/node/fix_key_gen_apis_are_not_available_in_boringssl.patch +++ b/patches/node/fix_key_gen_apis_are_not_available_in_boringssl.patch @@ -6,10 +6,10 @@ Subject: fix: key gen APIs are not available in BoringSSL This will make Node's key pair generation APIs fail. diff --git a/src/node_crypto.cc b/src/node_crypto.cc -index ed886abd749661a90e488b24152b2998fb38a4f8..3c9345fb46f65294b005102eafbaf60604a475f9 100644 +index bd40705e6b1ae0927239a06c40a2181e4458b1c4..79e781fb3e6ec63334c2c5d4b24d2a6049be79fc 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc -@@ -288,24 +288,14 @@ Maybe Decorate(Environment* env, Local obj, +@@ -291,24 +291,14 @@ Maybe Decorate(Environment* env, Local obj, V(BIO) \ V(PKCS7) \ V(X509V3) \ @@ -34,7 +34,7 @@ index ed886abd749661a90e488b24152b2998fb38a4f8..3c9345fb46f65294b005102eafbaf606 V(USER) \ #define V(name) case ERR_LIB_##name: lib = #name "_"; break; -@@ -6135,6 +6125,7 @@ class DSAKeyPairGenerationConfig : public KeyPairGenerationConfig { +@@ -6138,6 +6128,7 @@ class DSAKeyPairGenerationConfig : public KeyPairGenerationConfig { if (EVP_PKEY_paramgen_init(param_ctx.get()) <= 0) return nullptr; @@ -42,7 +42,7 @@ index ed886abd749661a90e488b24152b2998fb38a4f8..3c9345fb46f65294b005102eafbaf606 if (EVP_PKEY_CTX_set_dsa_paramgen_bits(param_ctx.get(), modulus_bits_) <= 0) return nullptr; -@@ -6145,6 +6136,7 @@ class DSAKeyPairGenerationConfig : public KeyPairGenerationConfig { +@@ -6148,6 +6139,7 @@ class DSAKeyPairGenerationConfig : public KeyPairGenerationConfig { return nullptr; } } diff --git a/patches/node/fix_remove_outdated_--experimental-wasm-bigint_flag.patch b/patches/node/fix_remove_outdated_--experimental-wasm-bigint_flag.patch index 7e2439ad3da4a..fdb89b3a5de3d 100644 --- a/patches/node/fix_remove_outdated_--experimental-wasm-bigint_flag.patch +++ b/patches/node/fix_remove_outdated_--experimental-wasm-bigint_flag.patch @@ -10,7 +10,7 @@ This patch can be removed as soon as we upgrade Node.js to a version of V8 which contains the above CL. diff --git a/test/wasi/test-return-on-exit.js b/test/wasi/test-return-on-exit.js -index 3f5d40c9ba7fb864767e9ac6c4b9a9f466d687e7..362d13b490a96f16029ba7edc0cda14db0feaab6 100644 +index eef97996fbf7442a6bdd808fe1b5b6eab148f322..e61f4174c3d4ee3778f5d0d5aeb2270f263ee63f 100644 --- a/test/wasi/test-return-on-exit.js +++ b/test/wasi/test-return-on-exit.js @@ -1,4 +1,4 @@ diff --git a/patches/node/fix_the_--harmony-weak-refs_has_been_removed_remove_from_specs.patch b/patches/node/fix_the_--harmony-weak-refs_has_been_removed_remove_from_specs.patch deleted file mode 100644 index 3abcbc61b2218..0000000000000 --- a/patches/node/fix_the_--harmony-weak-refs_has_been_removed_remove_from_specs.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Wed, 14 Apr 2021 12:04:18 -0700 -Subject: fix: the --harmony-weak-refs has been removed, remove from specs - -Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2741582 - -diff --git a/test/parallel/test-weakref.js b/test/parallel/test-weakref.js -index 9dac8463760dac6ee9270fe6805699c6bffd7299..ca7485aaa6a40c916fd3fec80960e9c6f6f3eda6 100644 ---- a/test/parallel/test-weakref.js -+++ b/test/parallel/test-weakref.js -@@ -1,6 +1,6 @@ - 'use strict'; - --// Flags: --expose-gc --harmony-weak-refs -+// Flags: --expose-gc - - require('../common'); - const assert = require('assert'); diff --git a/patches/node/fix_use_crypto_impls_for_compat.patch b/patches/node/fix_use_crypto_impls_for_compat.patch index f40a3a80389e4..2a14b777cec4a 100644 --- a/patches/node/fix_use_crypto_impls_for_compat.patch +++ b/patches/node/fix_use_crypto_impls_for_compat.patch @@ -8,10 +8,10 @@ by using the implementations of those functions as found in the OpenSSL repo. I plan to try and upstream a version of this. diff --git a/src/node_crypto.cc b/src/node_crypto.cc -index 3c9345fb46f65294b005102eafbaf60604a475f9..d7b6dbd85d6ef97370affde54bde4657f2413a06 100644 +index 79e781fb3e6ec63334c2c5d4b24d2a6049be79fc..c0baf86802a67f00830c81d325f448bcea7d4e40 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc -@@ -4571,7 +4571,7 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) { +@@ -4574,7 +4574,7 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) { if (base_id == EVP_PKEY_DSA) { DSA* dsa_key = EVP_PKEY_get0_DSA(pkey.get()); // Both r and s are computed mod q, so their width is limited by that of q. diff --git a/patches/node/make_module_globalpaths_a_reference.patch b/patches/node/make_module_globalpaths_a_reference.patch index b5fffc4dc4943..37f875e2cb764 100644 --- a/patches/node/make_module_globalpaths_a_reference.patch +++ b/patches/node/make_module_globalpaths_a_reference.patch @@ -10,10 +10,10 @@ node's module code. (cherry picked from commit 76ba048c37588ee32636817fa7b8dffc64330cbf) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index 223c6b21e39f482d256d2669fe4df4a74868d073..0b85bc8af1af275f05318bd315d9c6b9a5d3d6dd 100644 +index ebe0c741c9e177fe99631643030f97e8545c3368..82c08cd17b33c14b85e6586269b5dc4b233fd9e6 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js -@@ -1194,8 +1194,8 @@ Module._initPaths = function() { +@@ -1199,8 +1199,8 @@ Module._initPaths = function() { modulePaths = paths; diff --git a/patches/node/node-api_faster_threadsafe_function.patch b/patches/node/node-api_faster_threadsafe_function.patch index 2735193ca6aff..5f30335cc452e 100644 --- a/patches/node/node-api_faster_threadsafe_function.patch +++ b/patches/node/node-api_faster_threadsafe_function.patch @@ -219,7 +219,7 @@ index f1a5265b6a7234dc754aedc86ecd3132f3d90b09..d1076b29aeb5133a0325d3e7ebd097d2 // These are variables set once, upon creation, and then never again, which // means we don't need the mutex to read them. diff --git a/test/node-api/test_threadsafe_function/binding.c b/test/node-api/test_threadsafe_function/binding.c -index c9c526153804c60b5bd5844d2c2aacac7f0fb514..ae3ec67de43cfffdfb10772761dbd69f01c623bb 100644 +index b016dfa6c36656acf4a9010fd6fca18f10785158..339e772aa7e0e67b2448b7c23f5d87002e082305 100644 --- a/test/node-api/test_threadsafe_function/binding.c +++ b/test/node-api/test_threadsafe_function/binding.c @@ -7,7 +7,7 @@ diff --git a/patches/node/pass_all_globals_through_require.patch b/patches/node/pass_all_globals_through_require.patch index 779b0d70ce829..889d818ad0261 100644 --- a/patches/node/pass_all_globals_through_require.patch +++ b/patches/node/pass_all_globals_through_require.patch @@ -6,7 +6,7 @@ Subject: Pass all globals through "require" (cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index 0b85bc8af1af275f05318bd315d9c6b9a5d3d6dd..5bebce776dc60052aa01422af29d7766033e7331 100644 +index 82c08cd17b33c14b85e6586269b5dc4b233fd9e6..ef52bf6486d8c827dce105e50b57c1129dcaf5a4 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -109,6 +109,13 @@ const { @@ -23,7 +23,7 @@ index 0b85bc8af1af275f05318bd315d9c6b9a5d3d6dd..5bebce776dc60052aa01422af29d7766 const { isProxy } = require('internal/util/types'); -@@ -1058,10 +1065,12 @@ Module.prototype._compile = function(content, filename) { +@@ -1063,10 +1070,12 @@ Module.prototype._compile = function(content, filename) { if (requireDepth === 0) statCache = new Map(); if (inspectorWrapper) { result = inspectorWrapper(compiledWrapper, thisValue, exports, diff --git a/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch b/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch index 6d3ccb11cea91..a4c2953eb5f23 100644 --- a/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch +++ b/patches/node/refactor_allow_embedder_overriding_of_internal_fs_calls.patch @@ -22,10 +22,10 @@ index 2705f8b50a658db0fc1ce6fba245792f6a567300..5aab40071b68affe602be16d451be598 process.config = JSONParse(internalBinding('native_module').config); require('internal/worker/js_transferable').setup(); diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js -index 5bebce776dc60052aa01422af29d7766033e7331..541c18d8032c5247433367f9e04c946cf203d475 100644 +index ef52bf6486d8c827dce105e50b57c1129dcaf5a4..e2a205739ce89820fe5f1f24e609ff16b86afb04 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js -@@ -70,7 +70,7 @@ const fs = require('fs'); +@@ -71,7 +71,7 @@ const fs = require('fs'); const internalFS = require('internal/fs/utils'); const path = require('path'); const { sep } = path; @@ -34,7 +34,7 @@ index 5bebce776dc60052aa01422af29d7766033e7331..541c18d8032c5247433367f9e04c946c const packageJsonReader = require('internal/modules/package_json_reader'); const { safeGetenv } = internalBinding('credentials'); const { -@@ -142,7 +142,7 @@ function stat(filename) { +@@ -143,7 +143,7 @@ function stat(filename) { const result = statCache.get(filename); if (result !== undefined) return result; } diff --git a/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch b/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch index 2a83b14af11f5..33199ff33c127 100644 --- a/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch +++ b/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch @@ -7,10 +7,10 @@ Subject: refactor: alter child_process.fork to use execute script with When forking a child script, we setup a special environment to make the Electron binary run like the upstream node. On Mac, we use the helper app as node binary. diff --git a/lib/child_process.js b/lib/child_process.js -index 9e1c37af8f169f57891a5d814a31c02d91ec0cdc..17266798cbab11591fd6c18cf416fdcaa11568de 100644 +index ad5bce3db044d97b5283a8e9b3948bb21cf8970a..56b581121a8423874fd78698167adea5b2d63f27 100644 --- a/lib/child_process.js +++ b/lib/child_process.js -@@ -115,6 +115,15 @@ function fork(modulePath /* , args, options */) { +@@ -123,6 +123,15 @@ function fork(modulePath /* , args, options */) { throw new ERR_CHILD_PROCESS_IPC_REQUIRED('options.stdio'); } diff --git a/patches/node/remove_makeexternal_case_for_uncached_internal_strings.patch b/patches/node/remove_makeexternal_case_for_uncached_internal_strings.patch deleted file mode 100644 index 51194cf254051..0000000000000 --- a/patches/node/remove_makeexternal_case_for_uncached_internal_strings.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Tue, 8 Dec 2020 19:55:41 -0800 -Subject: Remove MakeExternal case for uncached internal strings - -https://chromium-review.googlesource.com/c/v8/v8/+/2565511 - -V8 removed a case where we can make an uncached internal string -through MakeExternal - to fix this we make the strings bigger so as to -make then internal & external & not uncached (i.e. cached). - -diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js -index bdee397eb58dd2e5ca59dc1ec280e9e664ba23f9..c52c958a1fd1a5679f731a1360b0563d13fa7581 100644 ---- a/test/parallel/test-fs-write.js -+++ b/test/parallel/test-fs-write.js -@@ -40,7 +40,7 @@ const constants = fs.constants; - common.allowGlobals(externalizeString, isOneByteString, x); - - { -- const expected = 'ümlaut eins'; // Must be a unique string. -+ const expected = 'ümlaut sechzig'; // Must be a unique string. - externalizeString(expected); - assert.strictEqual(isOneByteString(expected), true); - const fd = fs.openSync(fn, 'w'); -@@ -50,7 +50,7 @@ common.allowGlobals(externalizeString, isOneByteString, x); - } - - { -- const expected = 'ümlaut zwei'; // Must be a unique string. -+ const expected = 'ümlaut neunzig'; // Must be a unique string. - externalizeString(expected); - assert.strictEqual(isOneByteString(expected), true); - const fd = fs.openSync(fn, 'w'); -@@ -60,7 +60,7 @@ common.allowGlobals(externalizeString, isOneByteString, x); - } - - { -- const expected = '中文 1'; // Must be a unique string. -+ const expected = 'Zhōngwén 1'; // Must be a unique string. - externalizeString(expected); - assert.strictEqual(isOneByteString(expected), false); - const fd = fs.openSync(fn, 'w'); -@@ -70,7 +70,7 @@ common.allowGlobals(externalizeString, isOneByteString, x); - } - - { -- const expected = '中文 2'; // Must be a unique string. -+ const expected = 'Zhōngwén 2'; // Must be a unique string. - externalizeString(expected); - assert.strictEqual(isOneByteString(expected), false); - const fd = fs.openSync(fn, 'w');