chore: bump node to v14.17.0 (master) (#29151)

This commit is contained in:
electron-roller[bot] 2021-05-19 15:48:46 +02:00 коммит произвёл GitHub
Родитель 71e232f36d
Коммит 87dfe1ba99
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
27 изменённых файлов: 147 добавлений и 182 удалений

2
DEPS
Просмотреть файл

@ -16,7 +16,7 @@ vars = {
'chromium_version':
'92.0.4505.0',
'node_version':
'v14.16.1',
'v14.17.0',
'nan_version':
'v2.14.2',
'squirrel.mac_version':

Просмотреть файл

@ -27,12 +27,10 @@ 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
src_remove_extra_semi_after_member_fn.patch

Просмотреть файл

@ -373,10 +373,10 @@ index 0000000000000000000000000000000000000000..446119163d1f7bad577cb0b7b217ecf2
+}
diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..adce7f6aa905540da7eb8042606a285b260fefc4
index 0000000000000000000000000000000000000000..880bc22a44db82ef6bf9766bb2ad5af2a2f6d719
--- /dev/null
+++ b/deps/cares/BUILD.gn
@@ -0,0 +1,131 @@
@@ -0,0 +1,132 @@
+config("cares_config") {
+ include_dirs = [ "include" ]
+}
@ -399,13 +399,9 @@ index 0000000000000000000000000000000000000000..adce7f6aa905540da7eb8042606a285b
+ "include/ares_rules.h",
+ "include/ares_version.h",
+ "include/nameser.h",
+ "src/ares__close_sockets.c",
+ "src/ares__get_hostent.c",
+ "src/ares__read_line.c",
+ "src/ares__readaddrinfo.c",
+ "src/ares__timeval.c",
+ "src/ares_android.c",
+ "src/ares_cancel.c",
+ "src/ares__close_sockets.c",
+ "src/ares_create_query.c",
+ "src/ares_data.c",
+ "src/ares_data.h",
@ -421,11 +417,11 @@ index 0000000000000000000000000000000000000000..adce7f6aa905540da7eb8042606a285b
+ "src/ares_getaddrinfo.c",
+ "src/ares_gethostbyaddr.c",
+ "src/ares_gethostbyname.c",
+ "src/ares__get_hostent.c",
+ "src/ares_getnameinfo.c",
+ "src/ares_getopt.c",
+ "src/ares_getopt.h",
+ "src/ares_getsock.c",
+ "src/ares_inet_net_pton.h",
+ "src/ares_init.c",
+ "src/ares_ipv6.h",
+ "src/ares_library_init.c",
@ -437,8 +433,9 @@ index 0000000000000000000000000000000000000000..adce7f6aa905540da7eb8042606a285b
+ "src/ares_nowarn.h",
+ "src/ares_options.c",
+ "src/ares__parse_into_addrinfo.c",
+ "src/ares_parse_a_reply.c",
+ "src/ares_parse_aaaa_reply.c",
+ "src/ares_parse_a_reply.c",
+ "src/ares_parse_caa_reply.c",
+ "src/ares_parse_mx_reply.c",
+ "src/ares_parse_naptr_reply.c",
+ "src/ares_parse_ns_reply.c",
@ -450,6 +447,8 @@ index 0000000000000000000000000000000000000000..adce7f6aa905540da7eb8042606a285b
+ "src/ares_private.h",
+ "src/ares_process.c",
+ "src/ares_query.c",
+ "src/ares__read_line.c",
+ "src/ares__readaddrinfo.c",
+ "src/ares_search.c",
+ "src/ares_send.c",
+ "src/ares_setup.h",
@ -461,6 +460,7 @@ index 0000000000000000000000000000000000000000..adce7f6aa905540da7eb8042606a285b
+ "src/ares_strerror.c",
+ "src/ares_strsplit.c",
+ "src/ares_timeout.c",
+ "src/ares__timeval.c",
+ "src/ares_version.c",
+ "src/ares_writev.c",
+ "src/ares_writev.h",
@ -468,6 +468,7 @@ index 0000000000000000000000000000000000000000..adce7f6aa905540da7eb8042606a285b
+ "src/bitncmp.h",
+ "src/inet_net_pton.c",
+ "src/inet_ntop.c",
+ "src/ares_inet_net_pton.h",
+ "src/setup_once.h",
+ ]
+
@ -553,10 +554,10 @@ index 0000000000000000000000000000000000000000..ce15bc57093caa1bd84ea77e7438e892
+}
diff --git a/deps/nghttp2/BUILD.gn b/deps/nghttp2/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..66af819990b338caa49ca59d1fe6c5ad61816d05
index 0000000000000000000000000000000000000000..cd25ec4a073b45fd80beee829165e0dac4d8c5c1
--- /dev/null
+++ b/deps/nghttp2/BUILD.gn
@@ -0,0 +1,46 @@
@@ -0,0 +1,47 @@
+config("nghttp2_config") {
+ defines = [ "NGHTTP2_STATICLIB" ]
+ include_dirs = [ "lib/includes" ]
@ -588,6 +589,7 @@ index 0000000000000000000000000000000000000000..66af819990b338caa49ca59d1fe6c5ad
+ "lib/nghttp2_hd_huffman_data.c",
+ "lib/nghttp2_helper.c",
+ "lib/nghttp2_http.c",
+ "lib/nghttp2_ksl.c",
+ "lib/nghttp2_map.c",
+ "lib/nghttp2_mem.c",
+ "lib/nghttp2_npn.c",
@ -846,10 +848,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c0ef8c474
index 0000000000000000000000000000000000000000..c94c7150b72e64fe0e0f5c693da31230ab5985ea
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,544 @@
@@ -0,0 +1,550 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
@ -990,6 +992,7 @@ index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c
+ "lib/constants.js",
+ "lib/crypto.js",
+ "lib/cluster.js",
+ "lib/diagnostics_channel.js",
+ "lib/dgram.js",
+ "lib/dns.js",
+ "lib/domain.js",
@ -1038,6 +1041,7 @@ index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c
+ "lib/wasi.js",
+ "lib/worker_threads.js",
+ "lib/zlib.js",
+ "lib/internal/abort_controller.js",
+ "lib/internal/assert.js",
+ "lib/internal/assert/assertion_error.js",
+ "lib/internal/assert/calltracker.js",
@ -1141,6 +1145,7 @@ index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c
+ "lib/internal/source_map/source_map.js",
+ "lib/internal/source_map/source_map_cache.js",
+ "lib/internal/test/binding.js",
+ "lib/internal/timers/promises.js",
+ "lib/internal/timers.js",
+ "lib/internal/tls.js",
+ "lib/internal/trace_events_async_hooks.js",
@ -1284,6 +1289,7 @@ index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c
+ "src/string_decoder.cc",
+ "src/tcp_wrap.cc",
+ "src/timers.cc",
+ "src/timer_wrap.cc",
+ "src/tracing/agent.cc",
+ "src/tracing/node_trace_buffer.cc",
+ "src/tracing/node_trace_writer.cc",
@ -1364,6 +1370,7 @@ index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c
+ "src/node_union_bytes.h",
+ "src/node_url.h",
+ "src/node_version.h",
+ "src/node_v8.h",
+ "src/node_v8_platform-inl.h",
+ "src/node_wasi.h",
+ "src/node_watchdog.h",
@ -1387,6 +1394,7 @@ index 0000000000000000000000000000000000000000..7ecda5c553fe547f79f7d9fb5dc2d71c
+ "src/tracing/trace_event.h",
+ "src/tracing/trace_event_common.h",
+ "src/tracing/traced_value.h",
+ "src/timer_wrap.h",
+ "src/tty_wrap.h",
+ "src/udp_wrap.h",
+ "src/util.h",
@ -1395,10 +1403,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 +1641,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 +1780,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):

Просмотреть файл

@ -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.

Просмотреть файл

@ -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 @@

Просмотреть файл

@ -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);

Просмотреть файл

@ -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() {
}
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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 @@

Просмотреть файл

@ -1,39 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
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 gins 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<Value>& 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<UnboundScript> unbound_script =

Просмотреть файл

@ -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 @@

Просмотреть файл

@ -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;

Просмотреть файл

@ -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 c119b2314f18d1710bb3cbf1910c86ff994ec951..58554799b50097972405e40f593d089236bca961 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<Value>& args) {
@@ -5734,7 +5734,7 @@ void ECDH::SetPrivateKey(const FunctionCallbackInfo<Value>& 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;

Просмотреть файл

@ -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]) {

Просмотреть файл

@ -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) => {

Просмотреть файл

@ -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<bool> Decorate(Environment* env, Local<Object> obj,
@@ -291,24 +291,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> 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;
}
}

Просмотреть файл

@ -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 @@

Просмотреть файл

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
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');

Просмотреть файл

@ -3,15 +3,24 @@ From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 12 Feb 2020 15:08:04 -0800
Subject: fix: use crypto impls for compat
BoringSSL does not export DSA_get0_q. This patch works around that problem
by using the implementations of those functions as found in the OpenSSL repo.
I plan to try and upstream a version of this.
BoringSSL does not export DSA_get0_q, OPENSSL_secure_malloc, or
OPENSSL_secure_clear_free.
This patch works around the DSA_get0_q problem by using the
implementations of that function as found in the OpenSSL repo.
Node.js added the malloc/free incompatibilities in https://github.com/nodejs/node/pull/36729
though they don't use secure heap at the moment. This makes it equivalent
to swap these out with OPENSSL_malloc and OPENSSL_clear_free at present.
We can revisit this once that happens and determine a more mutually
compatible path forward either by upstreaming a shim to BoringSSL or
adapting Node.js.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 3c9345fb46f65294b005102eafbaf60604a475f9..d7b6dbd85d6ef97370affde54bde4657f2413a06 100644
index 79e781fb3e6ec63334c2c5d4b24d2a6049be79fc..c119b2314f18d1710bb3cbf1910c86ff994ec951 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.
@ -20,3 +29,21 @@ index 3c9345fb46f65294b005102eafbaf60604a475f9..d7b6dbd85d6ef97370affde54bde4657
} else if (base_id == EVP_PKEY_EC) {
EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey.get());
const EC_GROUP* ec_group = EC_KEY_get0_group(ec_key);
@@ -6949,7 +6949,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsUint32());
Environment* env = Environment::GetCurrent(args);
uint32_t len = args[0].As<Uint32>()->Value();
- char* data = static_cast<char*>(OPENSSL_secure_malloc(len));
+ char* data = static_cast<char*>(OPENSSL_malloc(len));
if (data == nullptr) {
// There's no memory available for the allocation.
// Return nothing.
@@ -6961,7 +6961,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
data,
len,
[](void* data, size_t len, void* deleter_data) {
- OPENSSL_secure_clear_free(data, len);
+ OPENSSL_clear_free(data, len);
},
data);
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);

Просмотреть файл

@ -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;

Просмотреть файл

@ -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 @@

Просмотреть файл

@ -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,

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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');
}

Просмотреть файл

@ -1,51 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
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');

Просмотреть файл

@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Fri, 14 May 2021 13:55:28 +0200
Subject: src: remove extra semi after member fn
This was added in https://github.com/nodejs/node/pull/34186 and
https://github.com/nodejs/node/pull/38172.
Fix upstreamed at https://github.com/nodejs/node/pull/38686.
diff --git a/src/cares_wrap.h b/src/cares_wrap.h
index bceafcb8b7f46b8044c69716e7241d2fa065ee5c..20d350a76321e8414508083c2037ad8c238c940b 100644
--- a/src/cares_wrap.h
+++ b/src/cares_wrap.h
@@ -141,8 +141,8 @@ struct NodeAresTask final : public MemoryRetainer {
uv_poll_t poll_watcher;
inline void MemoryInfo(MemoryTracker* trakcer) const override;
- SET_MEMORY_INFO_NAME(NodeAresTask);
- SET_SELF_SIZE(NodeAresTask);
+ SET_MEMORY_INFO_NAME(NodeAresTask)
+ SET_SELF_SIZE(NodeAresTask)
struct Hash {
inline size_t operator()(NodeAresTask* a) const {
diff --git a/src/timer_wrap.h b/src/timer_wrap.h
index b2c20bf24d8746b5bc33ac2e55f20cd303dff269..dbc23b442bea39d4556a21bb7f365dd68239095d 100644
--- a/src/timer_wrap.h
+++ b/src/timer_wrap.h
@@ -32,7 +32,7 @@ class TimerWrap final : public MemoryRetainer {
void Ref();
void Unref();
- SET_NO_MEMORY_INFO();
+ SET_NO_MEMORY_INFO()
SET_MEMORY_INFO_NAME(TimerWrap)
SET_SELF_SIZE(TimerWrap)

Просмотреть файл

@ -15,6 +15,7 @@
"parallel/test-cli-node-print-help",
"parallel/test-code-cache",
"parallel/test-crypto-aes-wrap",
"parallel/test-crypto-authenticated-stream",
"parallel/test-crypto-certificate",
"parallel/test-crypto-des3-wrap",
"parallel/test-crypto-dh-stateless",
@ -27,8 +28,10 @@
"parallel/test-domain-with-abort-on-uncaught-exception",
"parallel/test-finalization-group-error",
"parallel/test-freeze-intrinsics",
"parallel/test-fs-utimes-y2K38",
"parallel/test-fs-write-sigxfsz",
"parallel/test-gc-tls-external-memory",
"parallel/test-http2-clean-output",
"parallel/test-http2-reset-flood",
"parallel/test-https-agent-session-reuse",
"parallel/test-https-options-boolean-check",