зеркало из https://github.com/electron/electron.git
chore: bump node to v16.8.0 (main) (#30714)
* chore: bump node in DEPS to v16.8.0 * build: add option to hide console window https://github.com/nodejs/node/pull/39712 * chore: fixup patch indices * stream: duplexify https://github.com/nodejs/node/pull/39519 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Родитель
88ff3a6a9a
Коммит
c1075debf3
2
DEPS
2
DEPS
|
@ -17,7 +17,7 @@ vars = {
|
|||
'chromium_version':
|
||||
'95.0.4612.5',
|
||||
'node_version':
|
||||
'v16.7.0',
|
||||
'v16.8.0',
|
||||
'nan_version':
|
||||
# The following commit hash of NAN is v2.14.2 with *only* changes to the
|
||||
# test suite. This should be updated to a specific tag when one becomes
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
make_module_globalpaths_a_reference.patch
|
||||
fix_don_t_create_console_window_when_creating_process.patch
|
||||
refactor_alter_child_process_fork_to_use_execute_script_with.patch
|
||||
feat_add_uv_loop_watcher_queue_code.patch
|
||||
feat_initialize_asar_support.patch
|
||||
|
|
|
@ -21,7 +21,7 @@ index 1cc7da1ce15f43905ce607adcc1a23ed9d92948a..16af6aec3791df1363682f1ed024c522
|
|||
Isolate* isolate,
|
||||
const std::vector<std::string>& args,
|
||||
diff --git a/src/env.h b/src/env.h
|
||||
index 0877f5b1fe2db42acf908e0e1085626fc258ef54..25a8027b9e4ab7817e5ec153ddeccb3c1438912e 100644
|
||||
index 33f34ed79452b004b5fb40e70cda6e3d0ee2d1e2..e729ff349931b512052ad3557c62af6808b36c38 100644
|
||||
--- a/src/env.h
|
||||
+++ b/src/env.h
|
||||
@@ -1142,6 +1142,8 @@ class Environment : public MemoryRetainer {
|
||||
|
@ -47,7 +47,7 @@ index 6302bb925339d709a54151a8fc8b58f1a2253881..48a9eedfaf6350fc05fb104a1f44e85b
|
|||
ParseNodeOptionsEnvVar(node_options, errors);
|
||||
|
||||
diff --git a/src/node_worker.cc b/src/node_worker.cc
|
||||
index 43a3862cc69dc39b95b329f713691b19de3b8d7e..7782e8488f797a8cf83b1e02f012797ef256afe7 100644
|
||||
index 3e3cb67d9e8c8b1ea867ff31d96a81709b47cc8d..679282e688258314fcd594bab7fd711cac2c9e48 100644
|
||||
--- a/src/node_worker.cc
|
||||
+++ b/src/node_worker.cc
|
||||
@@ -457,6 +457,7 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
|
||||
|
|
|
@ -968,10 +968,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
|
|||
+}
|
||||
diff --git a/filenames.json b/filenames.json
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4f5588c17cf9720dab05a82ee64ba56b1860ab78
|
||||
index 0000000000000000000000000000000000000000..5804390a6185cbc5eac85af592eb0f40632d82ff
|
||||
--- /dev/null
|
||||
+++ b/filenames.json
|
||||
@@ -0,0 +1,548 @@
|
||||
@@ -0,0 +1,549 @@
|
||||
+// This file is automatically generated by generate_gn_filenames_json.py
|
||||
+// DO NOT EDIT
|
||||
+{
|
||||
|
@ -1197,6 +1197,7 @@ index 0000000000000000000000000000000000000000..4f5588c17cf9720dab05a82ee64ba56b
|
|||
+ "lib/internal/util/inspect.js",
|
||||
+ "lib/internal/util/iterable_weak_map.js",
|
||||
+ "lib/internal/streams/add-abort-signal.js",
|
||||
+ "lib/internal/streams/duplexify.js",
|
||||
+ "lib/internal/streams/destroy.js",
|
||||
+ "lib/internal/streams/legacy.js",
|
||||
+ "lib/internal/streams/passthrough.js",
|
||||
|
@ -1726,7 +1727,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 ee1263b8eaaab696b213b308d4aeb01359a289c8..5c4bda9aa24ee8f5db89d20772c28e66d574bcaa 100644
|
||||
index fc09960e70b4999635889615f584588ed1ca76d5..9b4de7c6015a700206c331c0c083e4aec200c939 100644
|
||||
--- a/src/node_version.h
|
||||
+++ b/src/node_version.h
|
||||
@@ -89,7 +89,10 @@
|
||||
|
|
|
@ -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 df463864778a30b2d2fd769a82ab3c066730b559..ae3f2d69f76f46cbb8cb3f8b32da592160b66009 100644
|
||||
index f1f921f92ed4d504f2cf41bded1821def565c9a3..9525a6639f084136ed25c9b1790a00a461f24b11 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -64,7 +64,7 @@
|
||||
|
|
|
@ -67,7 +67,7 @@ index 3ee25ebbd67a01d607456e5158c98ca2fdea396b..6302bb925339d709a54151a8fc8b58f1
|
|||
std::string tz;
|
||||
if (credentials::SafeGetenv("TZ", &tz) && !tz.empty()) {
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 4348dfba5b2be8973eda7f36bfb9479a744a07f6..4e533cab0b74221219752aea7533866830067c09 100644
|
||||
index 049163bf27cc7c1d6433b65becab0d7761491f09..09cb7a317cc46e88e5d214996dc87dc6e8730b1a 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -213,6 +213,8 @@ namespace node {
|
||||
|
|
|
@ -7,7 +7,7 @@ common.gypi is a file that's included in the node header bundle, despite
|
|||
the fact that we do not build node with gyp.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index fcd1cebeb560079b8b3b520e85c6c53bd1e779e0..df463864778a30b2d2fd769a82ab3c066730b559 100644
|
||||
index 8db2c0dec6ecfef968a945b570fdbd77ee62bdb8..f1f921f92ed4d504f2cf41bded1821def565c9a3 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -81,6 +81,23 @@
|
||||
|
|
|
@ -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 ae3f2d69f76f46cbb8cb3f8b32da592160b66009..9e25bbed1802c9531701235c438fe33076c3f326 100644
|
||||
index 9525a6639f084136ed25c9b1790a00a461f24b11..7c3fb852e1eb0e4382b25e6406c7d6514cf4fd21 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -65,6 +65,7 @@
|
||||
|
|
|
@ -11,10 +11,10 @@ initialize it in the browser process. This adds a new
|
|||
EnvironmentFlags option which allows preventing that invocation.
|
||||
|
||||
diff --git a/src/api/environment.cc b/src/api/environment.cc
|
||||
index de29d45adde76587f2a9cd50392ba45b8e24839e..09c0d22ff91856704f61024646c946a39baf53d8 100644
|
||||
index 523d252e08974a10f9a53fb46d3345669cec3380..5bf19a0dda42849159d954181058897c45d280fd 100644
|
||||
--- a/src/api/environment.cc
|
||||
+++ b/src/api/environment.cc
|
||||
@@ -341,12 +341,14 @@ Environment* CreateEnvironment(
|
||||
@@ -344,12 +344,14 @@ Environment* CreateEnvironment(
|
||||
Environment* env = new Environment(
|
||||
isolate_data, context, args, exec_args, nullptr, flags, thread_id);
|
||||
#if HAVE_INSPECTOR
|
||||
|
@ -36,11 +36,11 @@ index de29d45adde76587f2a9cd50392ba45b8e24839e..09c0d22ff91856704f61024646c946a3
|
|||
#endif
|
||||
|
||||
diff --git a/src/env-inl.h b/src/env-inl.h
|
||||
index b3b1ea908253b9240cc37931f34b2a8c8c9fa3ab..dc37298aa0e13bb79030123f38070d0254691b28 100644
|
||||
index 061897d95d8b5f61968c59260e609d7be724b88f..7c7ee3207089bf3e51db646a367bdd6deba18628 100644
|
||||
--- a/src/env-inl.h
|
||||
+++ b/src/env-inl.h
|
||||
@@ -877,6 +877,10 @@ inline bool Environment::tracks_unmanaged_fds() const {
|
||||
return flags_ & EnvironmentFlags::kTrackUnmanagedFds;
|
||||
@@ -881,6 +881,10 @@ inline bool Environment::hide_console_windows() const {
|
||||
return flags_ & EnvironmentFlags::kHideConsoleWindows;
|
||||
}
|
||||
|
||||
+inline bool Environment::should_initialize_inspector() const {
|
||||
|
@ -51,31 +51,31 @@ index b3b1ea908253b9240cc37931f34b2a8c8c9fa3ab..dc37298aa0e13bb79030123f38070d02
|
|||
return emit_filehandle_warning_;
|
||||
}
|
||||
diff --git a/src/env.h b/src/env.h
|
||||
index 24b4a48b5f9657cc115aaa50e0f7354534ed5484..0877f5b1fe2db42acf908e0e1085626fc258ef54 100644
|
||||
index 8760bc4361f199a2e3471c4ca435f8e178c78e7e..33f34ed79452b004b5fb40e70cda6e3d0ee2d1e2 100644
|
||||
--- a/src/env.h
|
||||
+++ b/src/env.h
|
||||
@@ -1198,6 +1198,7 @@ class Environment : public MemoryRetainer {
|
||||
inline bool owns_process_state() const;
|
||||
@@ -1199,6 +1199,7 @@ class Environment : public MemoryRetainer {
|
||||
inline bool owns_inspector() const;
|
||||
inline bool tracks_unmanaged_fds() const;
|
||||
inline bool hide_console_windows() const;
|
||||
+ inline bool should_initialize_inspector() const;
|
||||
inline uint64_t thread_id() const;
|
||||
inline worker::Worker* worker_context() const;
|
||||
Environment* worker_parent_env() const;
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 41f79ef869128636ac04093919e8e5816b39bef9..691c16ba60b0ce8633555825e44c3ace96c5000f 100644
|
||||
index b7f3e97873ef90b635e0648639f1a287a0bd88fa..48e378079f6d05e7cc1141a8875450b125028789 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -405,7 +405,11 @@ enum Flags : uint64_t {
|
||||
kNoRegisterESMLoader = 1 << 3,
|
||||
// Set this flag to make Node.js track "raw" file descriptors, i.e. managed
|
||||
// by fs.open() and fs.close(), and close them during FreeEnvironment().
|
||||
- kTrackUnmanagedFds = 1 << 4
|
||||
+ kTrackUnmanagedFds = 1 << 4,
|
||||
@@ -409,7 +409,11 @@ enum Flags : uint64_t {
|
||||
// Set this flag to force hiding console windows when spawning child
|
||||
// processes. This is usually used when embedding Node.js in GUI programs on
|
||||
// Windows.
|
||||
- kHideConsoleWindows = 1 << 5
|
||||
+ kHideConsoleWindows = 1 << 5,
|
||||
+ // Controls whether or not the Environment should call InitializeInspector.
|
||||
+ // This control is needed by embedders who may not want to initialize the V8
|
||||
+ // inspector in situations where it already exists.
|
||||
+ kNoInitializeInspector = 1 << 5
|
||||
+ kNoInitializeInspector = 1 << 6
|
||||
};
|
||||
} // namespace EnvironmentFlags
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Mon, 30 Jul 2018 10:23:05 -0700
|
||||
Subject: fix: don't create console window when creating process
|
||||
|
||||
This commit prevents console windows from being spawned when creating processes to better align with what Windows users expect and should be removed when upgrading to a version that includes https://github.com/nodejs/node/pull/21316
|
||||
|
||||
diff --git a/deps/uv/src/win/process.c b/deps/uv/src/win/process.c
|
||||
index 4038fbfd290d1acc91a27ad38e248a2deb06eb68..1ebc0f50e3f0cccb4d8887322b75e61c5284ba2f 100644
|
||||
--- a/deps/uv/src/win/process.c
|
||||
+++ b/deps/uv/src/win/process.c
|
||||
@@ -1098,6 +1098,9 @@ int uv_spawn(uv_loop_t* loop,
|
||||
process_flags |= DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP;
|
||||
}
|
||||
|
||||
+ /* Don't create console window. */
|
||||
+ process_flags |= CREATE_NO_WINDOW;
|
||||
+
|
||||
if (!CreateProcessW(application_path,
|
||||
arguments,
|
||||
NULL,
|
|
@ -7,10 +7,10 @@ Subject: fix: expose tracing::Agent and use tracing::TracingController instead
|
|||
This API is used by Electron to create Node's tracing controller.
|
||||
|
||||
diff --git a/src/api/environment.cc b/src/api/environment.cc
|
||||
index b7e213602b57d5cf15890726ae773d6067877c44..de29d45adde76587f2a9cd50392ba45b8e24839e 100644
|
||||
index 0fb750c5abbe00740f2095ec397c823e26666199..523d252e08974a10f9a53fb46d3345669cec3380 100644
|
||||
--- a/src/api/environment.cc
|
||||
+++ b/src/api/environment.cc
|
||||
@@ -456,6 +456,10 @@ MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env) {
|
||||
@@ -459,6 +459,10 @@ MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env) {
|
||||
return env->platform();
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ index b7e213602b57d5cf15890726ae773d6067877c44..de29d45adde76587f2a9cd50392ba45b
|
|||
int thread_pool_size,
|
||||
node::tracing::TracingController* tracing_controller) {
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 4e533cab0b74221219752aea7533866830067c09..41f79ef869128636ac04093919e8e5816b39bef9 100644
|
||||
index 09cb7a317cc46e88e5d214996dc87dc6e8730b1a..b7f3e97873ef90b635e0648639f1a287a0bd88fa 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -118,6 +118,7 @@ namespace node {
|
||||
|
@ -33,7 +33,7 @@ index 4e533cab0b74221219752aea7533866830067c09..41f79ef869128636ac04093919e8e581
|
|||
class TracingController;
|
||||
|
||||
}
|
||||
@@ -484,6 +485,8 @@ NODE_EXTERN v8::MaybeLocal<v8::Value> PrepareStackTraceCallback(
|
||||
@@ -488,6 +489,8 @@ NODE_EXTERN v8::MaybeLocal<v8::Value> PrepareStackTraceCallback(
|
||||
NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env);
|
||||
NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env);
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@ allocator that does handle these cases.
|
|||
Upstreamed in https://github.com/nodejs/node/pull/38362.
|
||||
|
||||
diff --git a/src/api/environment.cc b/src/api/environment.cc
|
||||
index 09c0d22ff91856704f61024646c946a39baf53d8..b060a8e980432637c430bd66a5216095984e4381 100644
|
||||
index 5bf19a0dda42849159d954181058897c45d280fd..03078ff3869fcd17101f1cdaf77f725dbbfa43e8 100644
|
||||
--- a/src/api/environment.cc
|
||||
+++ b/src/api/environment.cc
|
||||
@@ -472,8 +472,9 @@ MultiIsolatePlatform* CreatePlatform(
|
||||
@@ -475,8 +475,9 @@ MultiIsolatePlatform* CreatePlatform(
|
||||
|
||||
MultiIsolatePlatform* CreatePlatform(
|
||||
int thread_pool_size,
|
||||
|
@ -27,7 +27,7 @@ index 09c0d22ff91856704f61024646c946a39baf53d8..b060a8e980432637c430bd66a5216095
|
|||
.release();
|
||||
}
|
||||
|
||||
@@ -483,8 +484,9 @@ void FreePlatform(MultiIsolatePlatform* platform) {
|
||||
@@ -486,8 +487,9 @@ void FreePlatform(MultiIsolatePlatform* platform) {
|
||||
|
||||
std::unique_ptr<MultiIsolatePlatform> MultiIsolatePlatform::Create(
|
||||
int thread_pool_size,
|
||||
|
@ -40,7 +40,7 @@ index 09c0d22ff91856704f61024646c946a39baf53d8..b060a8e980432637c430bd66a5216095
|
|||
|
||||
MaybeLocal<Object> GetPerContextExports(Local<Context> context) {
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 691c16ba60b0ce8633555825e44c3ace96c5000f..ccb452bbe941c30fdc8c4eb616eb6f0259aa8b8e 100644
|
||||
index 48e378079f6d05e7cc1141a8875450b125028789..22e095804bca9d73d22707169c5aff2b13994344 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -313,7 +313,8 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform {
|
||||
|
@ -53,7 +53,7 @@ index 691c16ba60b0ce8633555825e44c3ace96c5000f..ccb452bbe941c30fdc8c4eb616eb6f02
|
|||
};
|
||||
|
||||
enum IsolateSettingsFlags {
|
||||
@@ -494,7 +495,8 @@ NODE_EXTERN node::tracing::Agent* CreateAgent();
|
||||
@@ -498,7 +499,8 @@ NODE_EXTERN node::tracing::Agent* CreateAgent();
|
||||
NODE_DEPRECATED("Use MultiIsolatePlatform::Create() instead",
|
||||
NODE_EXTERN MultiIsolatePlatform* CreatePlatform(
|
||||
int thread_pool_size,
|
||||
|
|
|
@ -450,13 +450,15 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
node::CreateIsolateData(context->GetIsolate(), uv_loop_, platform);
|
||||
|
||||
node::Environment* env;
|
||||
uint64_t flags = node::EnvironmentFlags::kDefaultFlags |
|
||||
node::EnvironmentFlags::kHideConsoleWindows;
|
||||
|
||||
if (browser_env_ != BrowserEnvironment::kBrowser) {
|
||||
// Only one ESM loader can be registered per isolate -
|
||||
// in renderer processes this should be blink. We need to tell Node.js
|
||||
// not to register its handler (overriding blinks) in non-browser processes.
|
||||
uint64_t flags = node::EnvironmentFlags::kDefaultFlags |
|
||||
node::EnvironmentFlags::kNoRegisterESMLoader |
|
||||
node::EnvironmentFlags::kNoInitializeInspector;
|
||||
flags |= node::EnvironmentFlags::kNoRegisterESMLoader |
|
||||
node::EnvironmentFlags::kNoInitializeInspector;
|
||||
v8::TryCatch try_catch(context->GetIsolate());
|
||||
env = node::CreateEnvironment(
|
||||
isolate_data_, context, args, exec_args,
|
||||
|
@ -470,7 +472,9 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
<< process_type;
|
||||
}
|
||||
} else {
|
||||
env = node::CreateEnvironment(isolate_data_, context, args, exec_args);
|
||||
env = node::CreateEnvironment(
|
||||
isolate_data_, context, args, exec_args,
|
||||
static_cast<node::EnvironmentFlags::Flags>(flags));
|
||||
DCHECK(env);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче