From 5c6d8c2b7d9bd6a926af0a70a83f3f0cb6bad1ae Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 18 Jun 2020 17:37:23 -0700 Subject: [PATCH] chore: bump node to v12.18.1 (master) (#24199) Co-authored-by: Shelley Vohr --- DEPS | 2 +- patches/node/.patches | 1 + patches/node/build_add_gn_build_files.patch | 8 +- ...ng_back_node_with_ltcg_configuration.patch | 2 +- ...xt-aware_native_modules_being_loaded.patch | 6 +- ...owserglobals_from_global_not_process.patch | 2 +- ...ngroupcallback_has_been_removed_from.patch | 14 ++-- ...is_on_64bit_arch_and_ptr_compression.patch | 2 +- ...s_for_low-level_hooks_and_exceptions.patch | 14 ++-- .../feat_add_uv_loop_watcher_queue_code.patch | 4 +- ...r_enable_lto_and_build_v8_with_gn_in.patch | 2 +- ...ment_out_incompatible_crypto_modules.patch | 2 +- .../fix_expose_internalcallbackscope.patch | 2 +- ..._apis_are_not_available_in_boringssl.patch | 2 +- .../fix_use_crypto_impls_for_compat.patch | 2 +- .../fixme_comment_trace_event_macro.patch | 2 +- ...ixme_remove_async_id_assertion_check.patch | 6 +- .../override_existing_v8_reallocate.patch | 2 +- ...dder_overriding_of_internal_fs_calls.patch | 2 +- ...is_deprecated_use_compiledwasmmodule.patch | 2 +- .../revert_crypto_add_oaeplabel_option.patch | 2 +- .../test_account_for_non-node_basename.patch | 79 +++++++++++++++++++ 22 files changed, 121 insertions(+), 39 deletions(-) create mode 100644 patches/node/test_account_for_non-node_basename.patch diff --git a/DEPS b/DEPS index 08f3086379d9..6bd09b0b7faa 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ vars = { 'chromium_version': 'ff6c4f4b826d66c2e32380bf5d1eb5e1fe37faef', 'node_version': - 'v12.18.0', + 'v12.18.1', 'nan_version': '2c4ee8a32a299eada3cd6e468bbd0a473bfea96d', diff --git a/patches/node/.patches b/patches/node/.patches index 3c3d08678d8e..864ae2953c00 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -37,3 +37,4 @@ fix_window_c-ares_incompatibilities.patch chore_sethostcleanupfinalizationgroupcallback_has_been_removed_from.patch fix_remove_bad_semicolon_outside_fn.patch fix_comment_out_incompatible_crypto_modules.patch +test_account_for_non-node_basename.patch diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 2b35026342d1..abe04f65f852 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -821,10 +821,10 @@ index 0000000000000000000000000000000000000000..67116f2070bb9200aace81afdf0b1e7a +} diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..b1c2cb80193bd0a0c56867428f2da8b46f11b16b +index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df6369a765c07 --- /dev/null +++ b/deps/uvwasi/BUILD.gn -@@ -0,0 +1,36 @@ +@@ -0,0 +1,38 @@ +config("uvwasi_config") { + include_dirs = [ "include" ] +} @@ -856,9 +856,11 @@ index 0000000000000000000000000000000000000000..b1c2cb80193bd0a0c56867428f2da8b4 + "src/clocks.c", + "src/fd_table.c", + "src/path_resolver.c", ++ "src/poll_oneoff.c", + "src/uv_mapping.c", + "src/uvwasi.c", + "src/wasi_rights.c", ++ "src/wasi_serdes.c" + ] +} diff --git a/filenames.json b/filenames.json @@ -1586,7 +1588,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c + args = rebase_path(inputs + outputs, root_build_dir) +} diff --git a/src/node_version.h b/src/node_version.h -index 49d0f6f8a69b48b79556e36c54daae080a00386b..aa1563e93ee66f1c1a2c6840b3d020dc8f9cef68 100644 +index 3d9276b8c92ad49681147b809a276c8157907b5e..2cc9fa91bf20bbde278e5d333ca485c0c159504e 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ diff --git a/patches/node/build_bring_back_node_with_ltcg_configuration.patch b/patches/node/build_bring_back_node_with_ltcg_configuration.patch index 90a91f0ad872..eaca35e261d2 100644 --- a/patches/node/build_bring_back_node_with_ltcg_configuration.patch +++ b/patches/node/build_bring_back_node_with_ltcg_configuration.patch @@ -10,7 +10,7 @@ THe fix for this should land in node-gyp as discussed in above issue, landing this as temporary patch. diff --git a/common.gypi b/common.gypi -index 1e8cac3c5123698d9551835639e87a0afa7a2246..325382613e59ef8796c1e878afed0cf66bc1e0ca 100644 +index 344466dd249323768541ae8c6c2800795845eea8..572597ef60c13dfc332c7da49b606867f0561c54 100644 --- a/common.gypi +++ b/common.gypi @@ -19,7 +19,7 @@ diff --git a/patches/node/chore_prevent_warn_non_context-aware_native_modules_being_loaded.patch b/patches/node/chore_prevent_warn_non_context-aware_native_modules_being_loaded.patch index 74e30af78268..3b10ecb61a0d 100644 --- a/patches/node/chore_prevent_warn_non_context-aware_native_modules_being_loaded.patch +++ b/patches/node/chore_prevent_warn_non_context-aware_native_modules_being_loaded.patch @@ -41,10 +41,10 @@ index e478c57af873da717c00db73d6719f806280efe1..1c949cab49224a6f1be7685acfd3ed19 try { resolvedArgv = Module._resolveFilename(process.argv[1], null, false); diff --git a/src/env.h b/src/env.h -index deeeb2a385ab75fbfd86af619e1aad118f1a0794..5c0392a59b3938b0b6e433024f9dd92e222a1b47 100644 +index c1fda87ecd536f2347f5011414932ec79aebfc60..12ba5b69369e858ee9e743ef06059d6cd5541078 100644 --- a/src/env.h +++ b/src/env.h -@@ -887,6 +887,15 @@ class Environment : public MemoryRetainer { +@@ -888,6 +888,15 @@ class Environment : public MemoryRetainer { uint64_t thread_id = kNoThreadId); ~Environment() override; @@ -60,7 +60,7 @@ index deeeb2a385ab75fbfd86af619e1aad118f1a0794..5c0392a59b3938b0b6e433024f9dd92e void InitializeLibuv(bool start_profiler_idle_notifier); inline const std::vector& exec_argv(); inline const std::vector& argv(); -@@ -1270,6 +1279,9 @@ class Environment : public MemoryRetainer { +@@ -1271,6 +1280,9 @@ class Environment : public MemoryRetainer { inline void ThrowError(v8::Local (*fun)(v8::Local), const char* errmsg); diff --git a/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch b/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch index d279f545dff0..cb95b70293c9 100644 --- a/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch +++ b/patches/node/chore_read_nobrowserglobals_from_global_not_process.patch @@ -7,7 +7,7 @@ This is used so that we can modify the flag at runtime where config can only be set at compile time. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js -index 36d06759aac57b1aa813b52c94e2168b8a8f9087..fd97a471aecc5182dfc3790286a3e01f02117937 100644 +index 4e7c3c10255a0eae4d5333f88e51cf7178163a44..a6e33757ca00771671583203c37d9b121abf489b 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -118,7 +118,7 @@ const { diff --git a/patches/node/chore_sethostcleanupfinalizationgroupcallback_has_been_removed_from.patch b/patches/node/chore_sethostcleanupfinalizationgroupcallback_has_been_removed_from.patch index 3ce2f6a885f5..821b7214c977 100644 --- a/patches/node/chore_sethostcleanupfinalizationgroupcallback_has_been_removed_from.patch +++ b/patches/node/chore_sethostcleanupfinalizationgroupcallback_has_been_removed_from.patch @@ -45,10 +45,10 @@ index 60d30b7eff7329c4235024c31525107216d70d7a..21980987644c6e83029157785dea4630 v8::CpuProfiler::UseDetailedSourcePositionsForProfiling(isolate); } diff --git a/src/env-inl.h b/src/env-inl.h -index fcb58dc6709d1333fb992e4a0fbf498fbb496994..71d86c4976806508c5b2db1563bfa4f460ff618f 100644 +index c6ef9dc13ab6f1d1a778871a62a0a98a01d84ec6..222555831aa1bf0b7b29b4b46e235c98a5dd4ac5 100644 --- a/src/env-inl.h +++ b/src/env-inl.h -@@ -1191,12 +1191,6 @@ void Environment::RemoveCleanupHook(void (*fn)(void*), void* arg) { +@@ -1123,12 +1123,6 @@ void Environment::RemoveCleanupHook(void (*fn)(void*), void* arg) { cleanup_hooks_.erase(search); } @@ -62,7 +62,7 @@ index fcb58dc6709d1333fb992e4a0fbf498fbb496994..71d86c4976806508c5b2db1563bfa4f4 const CleanupHookCallback& cb) const { return std::hash()(cb.arg_); diff --git a/src/env.cc b/src/env.cc -index 3974e6c7ebe74004a7a9e4dc2966fd8651c1522f..da779854f928abda5ee9d08c39ba1b5e5eb798a4 100644 +index c56a25f31e42aaf8bcbc0e3bb3db4f7aad0cf124..58f2372d664c4c6f8a513cb4206c24940891aa6d 100644 --- a/src/env.cc +++ b/src/env.cc @@ -30,7 +30,6 @@ using v8::ArrayBuffer; @@ -81,7 +81,7 @@ index 3974e6c7ebe74004a7a9e4dc2966fd8651c1522f..da779854f928abda5ee9d08c39ba1b5e env->RunAndClearNativeImmediates(); }); uv_unref(reinterpret_cast(&idle_prepare_handle_)); -@@ -1138,25 +1136,6 @@ void Environment::RunWeakRefCleanup() { +@@ -1127,25 +1125,6 @@ void Environment::RunWeakRefCleanup() { isolate()->ClearKeptObjects(); } @@ -108,10 +108,10 @@ index 3974e6c7ebe74004a7a9e4dc2966fd8651c1522f..da779854f928abda5ee9d08c39ba1b5e void BaseObject::DeleteMe(void* data) { BaseObject* self = static_cast(data); diff --git a/src/env.h b/src/env.h -index 5c0392a59b3938b0b6e433024f9dd92e222a1b47..7ba18f8ec0e2675cb634e26250266ad809708f82 100644 +index 12ba5b69369e858ee9e743ef06059d6cd5541078..b0b9b17dd6684c10139435b85e8724e31ad4d92c 100644 --- a/src/env.h +++ b/src/env.h -@@ -1129,9 +1129,7 @@ class Environment : public MemoryRetainer { +@@ -1130,9 +1130,7 @@ class Environment : public MemoryRetainer { void AtExit(void (*cb)(void* arg), void* arg); void RunAtExitCallbacks(); @@ -121,7 +121,7 @@ index 5c0392a59b3938b0b6e433024f9dd92e222a1b47..7ba18f8ec0e2675cb634e26250266ad8 // Strings and private symbols are shared across shared contexts // The getters simply proxy to the per-isolate primitive. -@@ -1354,8 +1352,6 @@ class Environment : public MemoryRetainer { +@@ -1355,8 +1353,6 @@ class Environment : public MemoryRetainer { uint64_t thread_id_; std::unordered_set sub_worker_contexts_; 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 3a260814bcd5..9910a6b7a69f 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 325382613e59ef8796c1e878afed0cf66bc1e0ca..4f629462828dfe23f3c9e28f70376f892dead76c 100644 +index 572597ef60c13dfc332c7da49b606867f0561c54..db8dc7452552beb6a758d1b6175bd402b6a09d24 100644 --- a/common.gypi +++ b/common.gypi @@ -71,6 +71,9 @@ diff --git a/patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch b/patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch index f2c889549050..3192bae70a7c 100644 --- a/patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch +++ b/patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch @@ -24,7 +24,7 @@ Environment on the V8 context of blink, so no new V8 context is created. As a result, a renderer process may have multiple Node Environments in it. diff --git a/src/env.cc b/src/env.cc -index 5b8a63a0017c4f9eed50afacb8de0b7f659f81b6..3974e6c7ebe74004a7a9e4dc2966fd8651c1522f 100644 +index 657d711e539d81bfd03166bbaaae7f0b5db91a5f..c56a25f31e42aaf8bcbc0e3bb3db4f7aad0cf124 100644 --- a/src/env.cc +++ b/src/env.cc @@ -410,6 +410,12 @@ Environment::Environment(IsolateData* isolate_data, @@ -41,10 +41,10 @@ index 5b8a63a0017c4f9eed50afacb8de0b7f659f81b6..3974e6c7ebe74004a7a9e4dc2966fd86 Environment::~Environment() { diff --git a/src/node.cc b/src/node.cc -index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce9f20042c 100644 +index 4ff7824b0011685289716d61b02427c3e264965d..2a21c6dfe74b97c0d4ca8608486f8f35c77cc831 100644 --- a/src/node.cc +++ b/src/node.cc -@@ -124,6 +124,9 @@ using v8::Undefined; +@@ -122,6 +122,9 @@ using v8::Undefined; using v8::V8; using v8::Value; @@ -54,7 +54,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce namespace per_process { // node_revert.h -@@ -339,6 +342,13 @@ MaybeLocal Environment::RunBootstrapping() { +@@ -337,6 +340,13 @@ MaybeLocal Environment::RunBootstrapping() { CHECK(!has_run_bootstrapping_code()); @@ -68,7 +68,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce if (BootstrapInternalLoaders().IsEmpty()) { return MaybeLocal(); } -@@ -735,7 +745,9 @@ int InitializeNodeWithArgs(std::vector* argv, +@@ -733,7 +743,9 @@ int InitializeNodeWithArgs(std::vector* argv, binding::RegisterBuiltinModules(); // Make inherited handles noninheritable. @@ -79,7 +79,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce // Cache the original command line to be // used in diagnostic reports. -@@ -769,6 +781,8 @@ int InitializeNodeWithArgs(std::vector* argv, +@@ -767,6 +779,8 @@ int InitializeNodeWithArgs(std::vector* argv, if (exit_code != 0) return exit_code; } #endif @@ -88,7 +88,7 @@ index da6aebf7178cf6d61ac46088bd50270b335e0b9e..f46db766de54f59d5baae28b16cd04ce const int exit_code = ProcessGlobalArgs(argv, exec_argv, -@@ -813,6 +827,7 @@ int InitializeNodeWithArgs(std::vector* argv, +@@ -811,6 +825,7 @@ int InitializeNodeWithArgs(std::vector* argv, } per_process::metadata.versions.InitializeIntlVersions(); #endif 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 3b2acdcd3b1d..2f01f367e68d 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 a3a770db88b90e3afc8f344c585c8c598ba2c088..b91e31237c5b3e2fb8c0bee8516155d23624a337 100644 +index fec663136a4ff14480cc8edcf846cba320ddd4eb..653c8910d7350185d1db4d343e19236a899b3a04 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h -@@ -1767,6 +1767,8 @@ union uv_any_req { +@@ -1770,6 +1770,8 @@ union uv_any_req { struct uv_loop_s { /* User data - use this for whatever. */ void* data; 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 3fb8f3d8b3a1..128a903dc3fc 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 7b97fbebe2deac534b3a24c807074c02b4336cf4..1e8cac3c5123698d9551835639e87a0afa7a2246 100644 +index 3b9cc3e885b254c80b2ff2ba1585972ce51a1e70..344466dd249323768541ae8c6c2800795845eea8 100644 --- a/common.gypi +++ b/common.gypi @@ -73,6 +73,22 @@ diff --git a/patches/node/fix_comment_out_incompatible_crypto_modules.patch b/patches/node/fix_comment_out_incompatible_crypto_modules.patch index feed278a1f6a..a5a9266062df 100644 --- a/patches/node/fix_comment_out_incompatible_crypto_modules.patch +++ b/patches/node/fix_comment_out_incompatible_crypto_modules.patch @@ -9,7 +9,7 @@ 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 ce48e608c07ca3d9dd717f92566c71c2a77cbcbc..a144d570d21cadccbb02349dc2f4ef44f6e7d79a 100644 +index cd763fd3755357b36e753cf778550cf2d498ed57..dad343e15d0f76bdef9d9cc4e78c7e20b1b58bb0 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5142,6 +5142,7 @@ bool DiffieHellman::Init(int primeLength, int g) { diff --git a/patches/node/fix_expose_internalcallbackscope.patch b/patches/node/fix_expose_internalcallbackscope.patch index 8d3092394aab..81a2b9cc0c7d 100644 --- a/patches/node/fix_expose_internalcallbackscope.patch +++ b/patches/node/fix_expose_internalcallbackscope.patch @@ -6,7 +6,7 @@ Subject: fix: expose InternalCallbackScope This commit exposes InternalCallbackScope in order to allow us access to its internal flags. diff --git a/src/node_internals.h b/src/node_internals.h -index 7ec3eac697e4b7d6160da59df709f416814e1f73..c362485dca561ed4a5210d7ac9f0e3b2a36a8d0c 100644 +index c1555b312e2f22e191d91d34a348d2e163d85b5b..084ecfa73657d1958d7552baa896e170934639c8 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -209,7 +209,7 @@ v8::MaybeLocal InternalMakeCallback( 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 2a3fded580aa..cb689d22df21 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,7 +6,7 @@ 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 9e3c63b5ec92459a98c0f64f57b79d8732a9a25d..39f2c58657fb7315b9abb1817ccafb9cb3f64948 100644 +index f08d68d6b6e6303485e2c53aebc0d42708bd022a..17aeb99d586161d0af69376811b42e84a80553e3 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -267,24 +267,14 @@ Maybe Decorate(Environment* env, Local obj, diff --git a/patches/node/fix_use_crypto_impls_for_compat.patch b/patches/node/fix_use_crypto_impls_for_compat.patch index ed894e429b26..7a54976a5e81 100644 --- a/patches/node/fix_use_crypto_impls_for_compat.patch +++ b/patches/node/fix_use_crypto_impls_for_compat.patch @@ -8,7 +8,7 @@ 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 f81e2f789c4b3b5655073cf44700a16e5b2ec45c..ce48e608c07ca3d9dd717f92566c71c2a77cbcbc 100644 +index 14029692e57b219d245d529a0be175c80f3a32de..cd763fd3755357b36e753cf778550cf2d498ed57 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4522,7 +4522,7 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) { diff --git a/patches/node/fixme_comment_trace_event_macro.patch b/patches/node/fixme_comment_trace_event_macro.patch index 575b4d85d1c6..9005f1890d3f 100644 --- a/patches/node/fixme_comment_trace_event_macro.patch +++ b/patches/node/fixme_comment_trace_event_macro.patch @@ -7,7 +7,7 @@ This broke the build at some point. Does it still? We should probably remove this patch and find out! diff --git a/src/node_internals.h b/src/node_internals.h -index c362485dca561ed4a5210d7ac9f0e3b2a36a8d0c..b627ad3ef42835407a83b721a2f78d4128e48327 100644 +index 084ecfa73657d1958d7552baa896e170934639c8..cb388f3a9f12949fd3ecb0406f7b550f4ca5ca7c 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -375,10 +375,11 @@ class TraceEventScope { diff --git a/patches/node/fixme_remove_async_id_assertion_check.patch b/patches/node/fixme_remove_async_id_assertion_check.patch index 65fcd8798443..577edf960c74 100644 --- a/patches/node/fixme_remove_async_id_assertion_check.patch +++ b/patches/node/fixme_remove_async_id_assertion_check.patch @@ -7,11 +7,11 @@ async hooks are hella broken in Electron. This was checking that they weren't, but they are, so we just disabled the check. YOLO. diff --git a/src/api/callback.cc b/src/api/callback.cc -index f7e7ddedfae377daa1441b0845c6828aedfc2a44..dc62f8cc1b80a1b7558ec1000ac856e9929c68a5 100644 +index c8934e1cd33a364ba55b437b080fe2c1c0f5de6c..63c9f5d7c08bebd25bd2602ab6b97c8987a102a4 100644 --- a/src/api/callback.cc +++ b/src/api/callback.cc -@@ -111,12 +111,14 @@ void InternalCallbackScope::Close() { - MicrotasksScope::PerformCheckpoint(env_->isolate()); +@@ -117,12 +117,14 @@ void InternalCallbackScope::Close() { + perform_stopping_check(); } +#if 0 // FIXME(codebytere): figure out why this check fails/causes crash diff --git a/patches/node/override_existing_v8_reallocate.patch b/patches/node/override_existing_v8_reallocate.patch index 5d757b623316..11131206c242 100644 --- a/patches/node/override_existing_v8_reallocate.patch +++ b/patches/node/override_existing_v8_reallocate.patch @@ -9,7 +9,7 @@ be overridden. This patch can be removed once the relevant version of V8 makes its way into Node.js. diff --git a/src/node_internals.h b/src/node_internals.h -index b627ad3ef42835407a83b721a2f78d4128e48327..efea9db2da008be6a1a470cece9d7a04a628c1a8 100644 +index cb388f3a9f12949fd3ecb0406f7b550f4ca5ca7c..f4b5c9bb7058da2355204a7285e5f7cc70c4ffda 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -115,7 +115,7 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator { 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 7aff139de153..dfdd1c597352 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 @@ -7,7 +7,7 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were a real filesystem. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js -index bb9a2b177c4304496dab1f1beaedc1ae9d9f55d9..36d06759aac57b1aa813b52c94e2168b8a8f9087 100644 +index c872941b974216d94863bcbf0e597b9c09ca50e2..4e7c3c10255a0eae4d5333f88e51cf7178163a44 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -57,6 +57,10 @@ setupBuffer(); diff --git a/patches/node/refactor_transferrablemodule_is_deprecated_use_compiledwasmmodule.patch b/patches/node/refactor_transferrablemodule_is_deprecated_use_compiledwasmmodule.patch index 0aad9532955d..9412af5405cc 100644 --- a/patches/node/refactor_transferrablemodule_is_deprecated_use_compiledwasmmodule.patch +++ b/patches/node/refactor_transferrablemodule_is_deprecated_use_compiledwasmmodule.patch @@ -7,7 +7,7 @@ Subject: refactor: TransferrableModule is deprecated, use CompiledWasmModule This is already present in Node.js v14 and can be removed when we upgrade. diff --git a/src/node_messaging.cc b/src/node_messaging.cc -index fa7132d7b43a3d9b04d4e830357e661a860916b3..8e8f458ef9f557f84b2a92ea20d8c9470b4a9cba 100644 +index 16b1a97eec2dfc236d54e76ef795ce1c0b958fb8..9ed2526fc04f63d857942684dd63b1b93ef2969e 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -57,7 +57,7 @@ class DeserializerDelegate : public ValueDeserializer::Delegate { diff --git a/patches/node/revert_crypto_add_oaeplabel_option.patch b/patches/node/revert_crypto_add_oaeplabel_option.patch index c65374ec2741..9aad64f8b230 100644 --- a/patches/node/revert_crypto_add_oaeplabel_option.patch +++ b/patches/node/revert_crypto_add_oaeplabel_option.patch @@ -8,7 +8,7 @@ The BoringSSL incompatibilities (OPENSSL_memdup) will be shimmed in and this sho be removed when the associated update is rolled into Chromium. diff --git a/src/node_crypto.cc b/src/node_crypto.cc -index 39f2c58657fb7315b9abb1817ccafb9cb3f64948..f81e2f789c4b3b5655073cf44700a16e5b2ec45c 100644 +index 17aeb99d586161d0af69376811b42e84a80553e3..14029692e57b219d245d529a0be175c80f3a32de 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5011,18 +5011,6 @@ bool PublicKeyCipher::Cipher(Environment* env, diff --git a/patches/node/test_account_for_non-node_basename.patch b/patches/node/test_account_for_non-node_basename.patch new file mode 100644 index 000000000000..d4190fedea01 --- /dev/null +++ b/patches/node/test_account_for_non-node_basename.patch @@ -0,0 +1,79 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Thu, 18 Jun 2020 14:40:35 -0700 +Subject: test: account for non-node basename + +Refs https://github.com/nodejs/node/commit/edf75e4299219d57e53f98956b8e27e4945dd5d6. + +Because Electron smoketests with Node.js' own specs, it's the case for us that the basename is +`Electron`. These tests were failing as they're hardcoded to assume it's `node` so this makes +them more flexible for embedders. + +Upstreamed at https://github.com/nodejs/node/pull/33952. + +diff --git a/test/message/eval_messages.out b/test/message/eval_messages.out +index 8840633959a18baf9b40305d73511d47ae213978..64743d4ae67acf1f8cb28b832b1f7204ace48952 100644 +--- a/test/message/eval_messages.out ++++ b/test/message/eval_messages.out +@@ -55,11 +55,11 @@ ReferenceError: y is not defined + var ______________________________________________; throw 10 + ^ + 10 +-(Use `node --trace-uncaught ...` to show where the exception was thrown) ++(Use `* --trace-uncaught ...` to show where the exception was thrown) + + [eval]:1 + var ______________________________________________; throw 10 + ^ + 10 +-(Use `node --trace-uncaught ...` to show where the exception was thrown) ++(Use `* --trace-uncaught ...` to show where the exception was thrown) + done +diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out +index 72edb0b00b28cd6cf6bac51519be4fde4708b161..3c71c5683b7d949bc7b1a46e7cbd4473c40cf871 100644 +--- a/test/message/stdin_messages.out ++++ b/test/message/stdin_messages.out +@@ -67,11 +67,11 @@ ReferenceError: y is not defined + let ______________________________________________; throw 10 + ^ + 10 +-(Use `node --trace-uncaught ...` to show where the exception was thrown) ++(Use `* --trace-uncaught ...` to show where the exception was thrown) + + [stdin]:1 + let ______________________________________________; throw 10 + ^ + 10 +-(Use `node --trace-uncaught ...` to show where the exception was thrown) ++(Use `* --trace-uncaught ...` to show where the exception was thrown) + done +diff --git a/test/message/throw_error_with_getter_throw.out b/test/message/throw_error_with_getter_throw.out +index 5daf35aad44ce37e3681d73d19c7e0eb7e7c3439..2162185e7845fcc5f716aa652e253db95462a622 100644 +--- a/test/message/throw_error_with_getter_throw.out ++++ b/test/message/throw_error_with_getter_throw.out +@@ -3,4 +3,4 @@ + throw { // eslint-disable-line no-throw-literal + ^ + [object Object] +-(Use `node --trace-uncaught ...` to show where the exception was thrown) ++(Use `* --trace-uncaught ...` to show where the exception was thrown) +diff --git a/test/message/throw_null.out b/test/message/throw_null.out +index db6cc3edf583eff7c815ea4fe24c3ecc60b03888..c97dcbfe134a22721d68f2bb5570d8e59450c3bb 100644 +--- a/test/message/throw_null.out ++++ b/test/message/throw_null.out +@@ -3,4 +3,4 @@ + throw null; + ^ + null +-(Use `node --trace-uncaught ...` to show where the exception was thrown) ++(Use `* --trace-uncaught ...` to show where the exception was thrown) +diff --git a/test/message/throw_undefined.out b/test/message/throw_undefined.out +index 016eb8ffd95e3389c93e24912d71ccb152fd99d7..4b2bfdbc5907085b19f43ba1306aaa6efc41beee 100644 +--- a/test/message/throw_undefined.out ++++ b/test/message/throw_undefined.out +@@ -3,4 +3,4 @@ + throw undefined; + ^ + undefined +-(Use `node --trace-uncaught ...` to show where the exception was thrown) ++(Use `* --trace-uncaught ...` to show where the exception was thrown)