зеркало из https://github.com/electron/electron.git
chore: bump node to v12.10.0 (master) (#20129)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Родитель
8dad0c7aaa
Коммит
6c6bff81ac
2
DEPS
2
DEPS
|
@ -13,7 +13,7 @@ vars = {
|
|||
'chromium_version':
|
||||
'6c775c358b709f4353bc693623bf58820adf3918',
|
||||
'node_version':
|
||||
'v12.9.1',
|
||||
'v12.10.0',
|
||||
'nan_version':
|
||||
'2ee313aaca52e2b478965ac50eb5082520380d1b',
|
||||
|
||||
|
|
|
@ -30,13 +30,11 @@ chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch
|
|||
inherit_electron_crashpad_pipe_name_in_child_process.patch
|
||||
fixme_revert_crypto_add_support_for_rsa-pss_keys.patch
|
||||
chore_re-add_compileandcall_this_should_be_added_as_a_helper_in.patch
|
||||
src_expose_maybeinitializecontext_to_allow_existing_contexts.patch
|
||||
fix_extern_the_nativemoduleenv_and_options_parser_for_debug_builds.patch
|
||||
chore_read_nobrowserglobals_from_global_not_process.patch
|
||||
chore_split_createenvironment_into_createenvironment_and.patch
|
||||
chore_handle_default_configuration_not_being_set_in_the_electron_env.patch
|
||||
revert_crypto_add_outputlength_option_to_crypto_createhash.patch
|
||||
add_openssl_is_boringssl_guard_to_oaep_hash_check.patch
|
||||
fix_microtasks.patch
|
||||
fsevents-stop-using-fsevents-to-watch-files.patch
|
||||
fsevents-regression-in-watching.patch
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 21 Aug 2019 12:43:26 -0700
|
||||
Subject: Add OPENSSL_IS_BORINGSSL guard to oaep_hash check
|
||||
|
||||
Adds an ifndef guard to the oaep_hash nullptr check in
|
||||
PublicKeyCipher::Cipher, since BORINGSSL does not expose either
|
||||
EVP_PKEY_OP_TYPE_CRYPT or EVP_PKEY_CTRL_RSA_OAEP_MD.
|
||||
|
||||
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
|
||||
index 59b60f1aea11666a7393831f8a465c247b66b009..1b44572c3a126c1ba3f610dbefb226acb34d246d 100644
|
||||
--- a/src/node_crypto.cc
|
||||
+++ b/src/node_crypto.cc
|
||||
@@ -5156,11 +5156,15 @@ bool PublicKeyCipher::Cipher(Environment* env,
|
||||
if (EVP_PKEY_CTX_set_rsa_padding(ctx.get(), padding) <= 0)
|
||||
return false;
|
||||
|
||||
+#ifdef OPENSSL_IS_BORINGSSL
|
||||
+ env->ThrowError("oaepHash option not supported in BoringSSL.");
|
||||
+#else
|
||||
if (oaep_hash != nullptr) {
|
||||
if (!EVP_PKEY_CTX_md(ctx.get(), EVP_PKEY_OP_TYPE_CRYPT,
|
||||
EVP_PKEY_CTRL_RSA_OAEP_MD, oaep_hash))
|
||||
return false;
|
||||
}
|
||||
+#endif
|
||||
|
||||
size_t out_len = 0;
|
||||
if (EVP_PKEY_cipher(ctx.get(), nullptr, &out_len, data, len) <= 0)
|
|
@ -885,7 +885,7 @@ new file mode 100644
|
|||
index 0000000000000000000000000000000000000000..be8613d11f9f5b1c6604257edf707792f2119fcb
|
||||
--- /dev/null
|
||||
+++ b/filenames.json
|
||||
@@ -0,0 +1,442 @@
|
||||
@@ -0,0 +1,443 @@
|
||||
+// This file is automatically generated by generate_gn_filenames_json.py
|
||||
+// DO NOT EDIT
|
||||
+{
|
||||
|
@ -1054,6 +1054,7 @@ index 0000000000000000000000000000000000000000..be8613d11f9f5b1c6604257edf707792
|
|||
+ "lib/internal/freeze_intrinsics.js",
|
||||
+ "lib/internal/fs/promises.js",
|
||||
+ "lib/internal/fs/read_file_context.js",
|
||||
+ "lib/internal/fs/rimraf.js",
|
||||
+ "lib/internal/fs/streams.js",
|
||||
+ "lib/internal/fs/sync_write_stream.js",
|
||||
+ "lib/internal/fs/utils.js",
|
||||
|
|
|
@ -3,6 +3,7 @@ From: Shelley Vohr <shelley.vohr@gmail.com>
|
|||
Date: Thu, 13 Sep 2018 08:56:07 -0700
|
||||
Subject: feat: initialize asar support
|
||||
|
||||
This patch initializies asar support in Node.js.
|
||||
|
||||
diff --git a/lib/internal/bootstrap/loaders.js b/lib/internal/bootstrap/loaders.js
|
||||
index 2889df4812bb031f1a0debe1eb0b75bd6c846407..0b3b92b33490fe754788a94dedce7533de528acf 100644
|
||||
|
@ -18,13 +19,13 @@ index 2889df4812bb031f1a0debe1eb0b75bd6c846407..0b3b92b33490fe754788a94dedce7533
|
|||
return NativeModule.map.has(id);
|
||||
};
|
||||
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
|
||||
index 104ebaff320573f3f517d0839eef66a186080da9..072e614fca05197fb2b259914711033981f6e2f2 100644
|
||||
index 158e9b73fa..8773e37c5c 100644
|
||||
--- a/lib/internal/bootstrap/pre_execution.js
|
||||
+++ b/lib/internal/bootstrap/pre_execution.js
|
||||
@@ -52,6 +52,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
|
||||
initializeCJSLoader();
|
||||
initializeESMLoader();
|
||||
loadPreloadModules();
|
||||
initializeFrozenIntrinsics();
|
||||
+ setupAsarSupport();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Thu, 4 Jul 2019 15:57:09 -0700
|
||||
Subject: src: expose MaybeInitializeContext to allow existing contexts
|
||||
|
||||
Splits the node.js specific tweak intialization of NewContext into a new
|
||||
helper MaybeInitializeContext so that embedders with existing contexts
|
||||
can still use them in a node Environment now that primordials are
|
||||
initialized and required so early.
|
||||
|
||||
diff --git a/src/api/environment.cc b/src/api/environment.cc
|
||||
index 35e8666ef771c56a1bcd441c99d4483a0d3e90bf..443f49320b2e6720f932fcfcefdbe6e539594964 100644
|
||||
--- a/src/api/environment.cc
|
||||
+++ b/src/api/environment.cc
|
||||
@@ -357,6 +357,13 @@ Local<Context> NewContext(Isolate* isolate,
|
||||
Local<ObjectTemplate> object_template) {
|
||||
auto context = Context::New(isolate, nullptr, object_template);
|
||||
if (context.IsEmpty()) return context;
|
||||
+
|
||||
+ return MaybeInitializeContext(context, object_template);
|
||||
+}
|
||||
+
|
||||
+Local<Context> MaybeInitializeContext(Local<Context> context,
|
||||
+ Local<ObjectTemplate> object_template) {
|
||||
+ Isolate* isolate = context->GetIsolate();
|
||||
HandleScope handle_scope(isolate);
|
||||
|
||||
context->SetEmbedderData(ContextEmbedderIndex::kAllowWasmCodeGeneration,
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index a2b47d1cf984ec36994b477b371cdf262191ab9c..c51fb1a6a6e497a091e2ba0b147e3d7b6a4d685c 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -303,6 +303,14 @@ NODE_EXTERN v8::Local<v8::Context> NewContext(
|
||||
v8::Local<v8::ObjectTemplate> object_template =
|
||||
v8::Local<v8::ObjectTemplate>());
|
||||
|
||||
+// Runs Node.js-specific tweaks on an already constructed context
|
||||
+// This is not dead code, it is exposed for embedders so that they
|
||||
+// can construct their own context and still use it in a node Environment.
|
||||
+NODE_EXTERN v8::Local<v8::Context> MaybeInitializeContext(
|
||||
+ v8::Local<v8::Context> context,
|
||||
+ v8::Local<v8::ObjectTemplate> object_template =
|
||||
+ v8::Local<v8::ObjectTemplate>());
|
||||
+
|
||||
// If `platform` is passed, it will be used to register new Worker instances.
|
||||
// It can be `nullptr`, in which case creating new Workers inside of
|
||||
// Environments that use this `IsolateData` will not work.
|
|
@ -77,6 +77,7 @@
|
|||
"parallel/test-module-version",
|
||||
"parallel/test-openssl-ca-options",
|
||||
"parallel/test-preload-print-process-argv",
|
||||
"parallel/test-preload",
|
||||
"parallel/test-process-env-allowed-flags-are-documented",
|
||||
"parallel/test-process-env-sideeffects",
|
||||
"parallel/test-process-exception-capture",
|
||||
|
@ -244,6 +245,7 @@
|
|||
"parallel/test-vm-module-basic",
|
||||
"parallel/test-repl-sigint-nested-eval",
|
||||
"parallel/test-repl-sigint",
|
||||
"parallel/test-util-inspect",
|
||||
"sequential/test-vm-timeout-rethrow",
|
||||
"parallel/test-vm-sigint",
|
||||
"parallel/test-vm-timeout",
|
||||
|
|
|
@ -121,11 +121,10 @@ void AtomRendererClient::DidCreateScriptContext(
|
|||
node::tracing::TraceEventHelper::SetAgent(node::CreateAgent());
|
||||
|
||||
// Setup node environment for each window.
|
||||
v8::Local<v8::Context> context =
|
||||
node::MaybeInitializeContext(renderer_context);
|
||||
DCHECK(!context.IsEmpty());
|
||||
DCHECK(node::InitializeContext(renderer_context));
|
||||
node::Environment* env =
|
||||
node_bindings_->CreateEnvironment(context, nullptr, true);
|
||||
node_bindings_->CreateEnvironment(renderer_context, nullptr, true);
|
||||
|
||||
// If we have disabled the site instance overrides we should prevent loading
|
||||
// any non-context aware native module
|
||||
if (command_line->HasSwitch(switches::kDisableElectronSiteInstanceOverrides))
|
||||
|
|
|
@ -48,10 +48,9 @@ void WebWorkerObserver::ContextCreated(v8::Local<v8::Context> worker_context) {
|
|||
node_bindings_->PrepareMessageLoop();
|
||||
|
||||
// Setup node environment for each window.
|
||||
v8::Local<v8::Context> context = node::MaybeInitializeContext(worker_context);
|
||||
DCHECK(!context.IsEmpty());
|
||||
DCHECK(node::InitializeContext(worker_context));
|
||||
node::Environment* env =
|
||||
node_bindings_->CreateEnvironment(context, nullptr, true);
|
||||
node_bindings_->CreateEnvironment(worker_context, nullptr, true);
|
||||
|
||||
// Add Electron extended APIs.
|
||||
electron_bindings_->BindTo(env->isolate(), env->process_object());
|
||||
|
|
Загрузка…
Ссылка в новой задаче