X Tutup
Skip to content

Commit fdf7e28

Browse files
chore: bump node to v12.16.2 (master) (electron#23057)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 701c5c9 commit fdf7e28

File tree

33 files changed

+163
-380
lines changed

33 files changed

+163
-380
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vars = {
1414
'chromium_version':
1515
'e7c84a47c0598ebf6c3f0b7bd96bdb1a4b42208f',
1616
'node_version':
17-
'v12.16.1',
17+
'v12.16.2',
1818
'nan_version':
1919
'2c4ee8a32a299eada3cd6e468bbd0a473bfea96d',
2020

patches/node/.patches

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,11 @@ build_bring_back_node_with_ltcg_configuration.patch
2626
revert_crypto_add_oaeplabel_option.patch
2727
refactor_transferrablemodule_is_deprecated_use_compiledwasmmodule.patch
2828
enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch
29-
fix_include_libuv_header_in_node_binding.patch
3029
remove_deprecated_task_api_override_removed_in_latest_v8.patch
3130
remove_serialization_deserialization_of_wasmmoduleobject.patch
32-
64bit_bump_typedarray_max_length_to_2_32-1_elements.patch
3331
override_existing_v8_reallocate.patch
34-
fix_use_hex_not_decimal_for_clarity.patch
3532
fix_use_crypto_impls_for_compat.patch
36-
fix_ensure_clocks_header_included_in_impl.patch
37-
fix_remove_implicit_type_conversions.patch
38-
fix_include_io_h_in_uvwasi_for_win.patch
39-
fix_--perf-prof_only_works_on_linux.patch
4033
fix_we_need_to_eager-load_cjs_modules.patch
41-
fix_don_t_preparemainexecution_twice.patch
4234
avoid_calling_deprecated_method.patch
4335
remove_deprecated_wasm_module_type_check.patch
4436
weakrefs_rename_finalizationgroup_to_finalizationregistry_for_js.patch

patches/node/64bit_bump_typedarray_max_length_to_2_32-1_elements.patch

Lines changed: 0 additions & 44 deletions
This file was deleted.

patches/node/build_add_gn_build_files.patch

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
77

88
diff --git a/BUILD.gn b/BUILD.gn
99
new file mode 100644
10-
index 0000000000000000000000000000000000000000..e4aab62b85e6ea1eac68cc21056081b4ff4bd1d6
10+
index 0000000000000000000000000000000000000000..22d119036d12c396af935fe85ae18751e6d80562
1111
--- /dev/null
1212
+++ b/BUILD.gn
13-
@@ -0,0 +1,358 @@
13+
@@ -0,0 +1,360 @@
1414
+import("//electron/build/asar.gni")
1515
+import("//v8/gni/v8.gni")
1616
+
@@ -275,6 +275,8 @@ index 0000000000000000000000000000000000000000..e4aab62b85e6ea1eac68cc21056081b4
275275
+ sources += [
276276
+ "src/node_crypto.cc",
277277
+ "src/node_crypto.h",
278+
+ "src/node_crypto_common.cc",
279+
+ "src/node_crypto_common.h",
278280
+ "src/node_crypto_bio.cc",
279281
+ "src/node_crypto_bio.h",
280282
+ "src/node_crypto_clienthello-inl.h",
@@ -814,10 +816,10 @@ index 0000000000000000000000000000000000000000..67116f2070bb9200aace81afdf0b1e7a
814816
+}
815817
diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn
816818
new file mode 100644
817-
index 0000000000000000000000000000000000000000..e9beace20f25e270dd80509bd6d5871b140d5b79
819+
index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c7128ab5eec
818820
--- /dev/null
819821
+++ b/deps/uvwasi/BUILD.gn
820-
@@ -0,0 +1,34 @@
822+
@@ -0,0 +1,35 @@
821823
+config("uvwasi_config") {
822824
+ include_dirs = [ "include" ]
823825
+}
@@ -850,6 +852,7 @@ index 0000000000000000000000000000000000000000..e9beace20f25e270dd80509bd6d5871b
850852
+ "src/fd_table.c",
851853
+ "src/uv_mapping.c",
852854
+ "src/uvwasi.c",
855+
+ "src/wasi_rights.c",
853856
+ ]
854857
+}
855858
diff --git a/deps/zlib/BUILD.gn b/deps/zlib/BUILD.gn
@@ -918,10 +921,10 @@ index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2ea
918921
+}
919922
diff --git a/filenames.json b/filenames.json
920923
new file mode 100644
921-
index 0000000000000000000000000000000000000000..d325cdc5ca7a323834c6962fa43d2c9ff38a5728
924+
index 0000000000000000000000000000000000000000..78dff9e0458aaa6b864259f3001764c77b977e36
922925
--- /dev/null
923926
+++ b/filenames.json
924-
@@ -0,0 +1,460 @@
927+
@@ -0,0 +1,469 @@
925928
+// This file is automatically generated by generate_gn_filenames_json.py
926929
+// DO NOT EDIT
927930
+{
@@ -939,8 +942,15 @@ index 0000000000000000000000000000000000000000..d325cdc5ca7a323834c6962fa43d2c9f
939942
+ ]
940943
+ },
941944
+ {
945+
+ "dest_dir": "include/node//cppgc/",
946+
+ "files": [
947+
+ "//v8/include/cppgc/finalizer-trait.h"
948+
+ ]
949+
+ },
950+
+ {
942951
+ "dest_dir": "include/node//",
943952
+ "files": [
953+
+ "//v8/include/v8-fast-api-calls.h",
944954
+ "//v8/include/v8-internal.h",
945955
+ "//v8/include/v8-platform.h",
946956
+ "//v8/include/v8-profiler.h",
@@ -990,6 +1000,7 @@ index 0000000000000000000000000000000000000000..d325cdc5ca7a323834c6962fa43d2c9f
9901000
+ }
9911001
+ ],
9921002
+ "library_files": [
1003+
+ "lib/internal/bootstrap/environment.js",
9931004
+ "lib/internal/bootstrap/loaders.js",
9941005
+ "lib/internal/bootstrap/node.js",
9951006
+ "lib/internal/bootstrap/pre_execution.js",
@@ -1302,6 +1313,7 @@ index 0000000000000000000000000000000000000000..d325cdc5ca7a323834c6962fa43d2c9f
13021313
+ "src/connect_wrap.h",
13031314
+ "src/connection_wrap.h",
13041315
+ "src/debug_utils.h",
1316+
+ "src/debug_utils-inl.h",
13051317
+ "src/env.h",
13061318
+ "src/env-inl.h",
13071319
+ "src/handle_wrap.h",
@@ -1588,7 +1600,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
15881600
+ args = rebase_path(inputs + outputs, root_build_dir)
15891601
+}
15901602
diff --git a/src/node_version.h b/src/node_version.h
1591-
index 88831ab19d72014f3e92c80516dc6c9d76e16158..01377c95b74879e74ca476eda6899e69597b9d89 100644
1603+
index 8a4192dcc74c8809f47e862f673b850a40084577..29dab977e8a31dfb5aae44bf4b03e855ee18aff0 100644
15921604
--- a/src/node_version.h
15931605
+++ b/src/node_version.h
15941606
@@ -89,7 +89,10 @@

patches/node/build_bring_back_node_with_ltcg_configuration.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ THe fix for this should land in node-gyp as discussed in above issue,
1010
landing this as temporary patch.
1111

1212
diff --git a/common.gypi b/common.gypi
13-
index 0000f6eaea5cbfb793750c0592c1bb912cbe0a14..6ed509d81d14211f608495263f11a1d2cbc5013c 100644
13+
index bf6dda11463d0bee97262ccc6d344d8b2efad8d2..87f5a3bd3b741d58e956cad4599012a11d46ba29 100644
1414
--- a/common.gypi
1515
+++ b/common.gypi
1616
@@ -19,7 +19,7 @@
@@ -22,7 +22,7 @@ index 0000f6eaea5cbfb793750c0592c1bb912cbe0a14..6ed509d81d14211f608495263f11a1d2
2222
'node_shared_openssl%': 'false',
2323

2424
'node_tag%': '',
25-
@@ -240,6 +240,26 @@
25+
@@ -243,6 +243,26 @@
2626
'cflags': [ '-fPIC' ],
2727
'ldflags': [ '-fPIC' ]
2828
}],

patches/node/chore_prevent_warn_non_context-aware_native_modules_being_loaded.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ index cef4e5086ca8160a7d715915f735963e369068b1..35ad9ee1a685177894bb5c13c58c16af
2323

2424
// TODO(joyeecheung): most of these should be deprecated and removed,
2525
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
26-
index 22912e7c89b4cba78315269c3e009bfca1ccec27..8d6fc381330867f40740c1e2e327a05cc4045785 100644
26+
index 8bb5dae46966541884dbad5bb9c3a3f790c56358..6bc051ca5b864945aedea7a6fa8cf23cb509f9e9 100644
2727
--- a/lib/internal/modules/cjs/loader.js
2828
+++ b/lib/internal/modules/cjs/loader.js
29-
@@ -1129,6 +1129,13 @@ Module.prototype._compile = function(content, filename) {
29+
@@ -1127,6 +1127,13 @@ Module.prototype._compile = function(content, filename) {
3030
if (getOptionValue('--inspect-brk') && process._eval == null) {
3131
if (!resolvedArgv) {
3232
// We enter the repl if we're not given a filename argument.
@@ -41,12 +41,12 @@ index 22912e7c89b4cba78315269c3e009bfca1ccec27..8d6fc381330867f40740c1e2e327a05c
4141
try {
4242
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
4343
diff --git a/src/env.h b/src/env.h
44-
index 4e625f34741c0cf1cd175baf0189406140124ceb..aa40bdc3ccd963b8b6f48d52378801f88f87b733 100644
44+
index e5e8c107f6881d96e1d8a2b55fff425d5e29b0a4..6a7263736b5252e9ce36269a5be9c58dd031ee94 100644
4545
--- a/src/env.h
4646
+++ b/src/env.h
47-
@@ -911,6 +911,15 @@ class Environment : public MemoryRetainer {
47+
@@ -878,6 +878,15 @@ class Environment : public MemoryRetainer {
4848
uint64_t thread_id = kNoThreadId);
49-
~Environment();
49+
~Environment() override;
5050

5151
+ void ForceOnlyContextAwareNativeModules() {
5252
+ force_context_aware_ = true;
@@ -60,7 +60,7 @@ index 4e625f34741c0cf1cd175baf0189406140124ceb..aa40bdc3ccd963b8b6f48d52378801f8
6060
void InitializeLibuv(bool start_profiler_idle_notifier);
6161
inline const std::vector<std::string>& exec_argv();
6262
inline const std::vector<std::string>& argv();
63-
@@ -1280,6 +1289,9 @@ class Environment : public MemoryRetainer {
63+
@@ -1263,6 +1272,9 @@ class Environment : public MemoryRetainer {
6464
inline void ThrowError(v8::Local<v8::Value> (*fun)(v8::Local<v8::String>),
6565
const char* errmsg);
6666

patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ node modules will have different (wrong) ideas about how v8 structs are laid
88
out in memory on 64-bit machines, and will summarily fail to work.
99

1010
diff --git a/common.gypi b/common.gypi
11-
index 6ed509d81d14211f608495263f11a1d2cbc5013c..26a3b48dbfb4b066d86e4eaa73d870a442ccbdaa 100644
11+
index 87f5a3bd3b741d58e956cad4599012a11d46ba29..23958d5535819fd9d1a14868aea3cc39762a102f 100644
1212
--- a/common.gypi
1313
+++ b/common.gypi
1414
@@ -75,6 +75,9 @@
@@ -28,10 +28,10 @@ index 6ed509d81d14211f608495263f11a1d2cbc5013c..26a3b48dbfb4b066d86e4eaa73d870a4
2828
+ ['target_arch == "arm64" or target_arch == "x64"', {
2929
+ 'v8_enable_pointer_compression': 1,
3030
+ }],
31-
],
32-
},
33-
34-
@@ -375,6 +381,12 @@
31+
['target_arch in "ppc64 s390x"', {
32+
'v8_enable_backtrace': 1,
33+
}],
34+
@@ -378,6 +384,12 @@
3535
}],
3636
],
3737
}],

patches/node/expose_get_builtin_module_function.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ index 0facfc36cbcb784cd0a1802a7748dff3366710fd..db60617cebee83ac09371aa1e2200280
2424
Environment* env = Environment::GetCurrent(args);
2525

2626
diff --git a/src/node_binding.h b/src/node_binding.h
27-
index 42f3c5b8d00880588f442a4e724e080128c56dfe..cefb6419ebb7f5c5c79927d179eef0a790e234ad 100644
27+
index 5bced5b41431dc7838d1a30774a1a41ff797290e..4233ee968fb4b3b5456997cbf1450ecf07392455 100644
2828
--- a/src/node_binding.h
2929
+++ b/src/node_binding.h
30-
@@ -90,6 +90,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
30+
@@ -91,6 +91,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
3131
void GetLinkedBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
3232
void DLOpen(const v8::FunctionCallbackInfo<v8::Value>& args);
3333

patches/node/feat_add_flags_for_low-level_hooks_and_exceptions.patch

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Environment on the V8 context of blink, so no new V8 context is created.
2424
As a result, a renderer process may have multiple Node Environments in it.
2525

2626
diff --git a/src/env.cc b/src/env.cc
27-
index 3dbc56b7c56bee90b76ade6af610105d1e0e916e..2678de6f7dcab8efb1ea506ae9861e07df5544f1 100644
27+
index 2bdac964cb03cad4b9637c3cea56a8e5f650056f..4b1c72a5f67ab1882cbb61b4c52fc50e28aa5b25 100644
2828
--- a/src/env.cc
2929
+++ b/src/env.cc
30-
@@ -385,6 +385,12 @@ Environment::Environment(IsolateData* isolate_data,
30+
@@ -384,6 +384,12 @@ Environment::Environment(IsolateData* isolate_data,
3131
// TODO(joyeecheung): deserialize when the snapshot covers the environment
3232
// properties.
3333
CreateProperties();
@@ -41,7 +41,7 @@ index 3dbc56b7c56bee90b76ade6af610105d1e0e916e..2678de6f7dcab8efb1ea506ae9861e07
4141

4242
Environment::~Environment() {
4343
diff --git a/src/node.cc b/src/node.cc
44-
index 80916e5244aa36da1e3a0a91887ab134f14f8b3d..cc634682f5aedf8f92fd6d8a9e26dfcd6b7f8ee6 100644
44+
index fee485f86e17f1987e140aea874656e5048cdbfe..7dda6b39c37cdf96f59a34ca6bc75ea2c7fde060 100644
4545
--- a/src/node.cc
4646
+++ b/src/node.cc
4747
@@ -27,6 +27,7 @@
@@ -52,7 +52,7 @@ index 80916e5244aa36da1e3a0a91887ab134f14f8b3d..cc634682f5aedf8f92fd6d8a9e26dfcd
5252
#include "node_internals.h"
5353
#include "node_main_instance.h"
5454
#include "node_metadata.h"
55-
@@ -131,6 +132,9 @@ using v8::Undefined;
55+
@@ -128,6 +129,9 @@ using v8::Undefined;
5656
using v8::V8;
5757
using v8::Value;
5858

@@ -62,7 +62,7 @@ index 80916e5244aa36da1e3a0a91887ab134f14f8b3d..cc634682f5aedf8f92fd6d8a9e26dfcd
6262
namespace per_process {
6363

6464
// node_revert.h
65-
@@ -362,6 +366,13 @@ MaybeLocal<Value> Environment::RunBootstrapping() {
65+
@@ -343,6 +347,13 @@ MaybeLocal<Value> Environment::RunBootstrapping() {
6666

6767
CHECK(!has_run_bootstrapping_code());
6868

@@ -76,7 +76,7 @@ index 80916e5244aa36da1e3a0a91887ab134f14f8b3d..cc634682f5aedf8f92fd6d8a9e26dfcd
7676
if (BootstrapInternalLoaders().IsEmpty()) {
7777
return MaybeLocal<Value>();
7878
}
79-
@@ -752,7 +763,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
79+
@@ -726,7 +737,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
8080
binding::RegisterBuiltinModules();
8181

8282
// Make inherited handles noninheritable.
@@ -87,7 +87,7 @@ index 80916e5244aa36da1e3a0a91887ab134f14f8b3d..cc634682f5aedf8f92fd6d8a9e26dfcd
8787

8888
#ifdef NODE_REPORT
8989
// Cache the original command line to be
90-
@@ -849,6 +862,8 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
90+
@@ -762,6 +775,8 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
9191
if (exit_code != 0) return exit_code;
9292
}
9393
#endif
@@ -96,7 +96,7 @@ index 80916e5244aa36da1e3a0a91887ab134f14f8b3d..cc634682f5aedf8f92fd6d8a9e26dfcd
9696

9797
const int exit_code = ProcessGlobalArgs(argv,
9898
exec_argv,
99-
@@ -893,6 +908,7 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
99+
@@ -806,6 +821,7 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
100100
}
101101
per_process::metadata.versions.InitializeIntlVersions();
102102
#endif
@@ -105,10 +105,10 @@ index 80916e5244aa36da1e3a0a91887ab134f14f8b3d..cc634682f5aedf8f92fd6d8a9e26dfcd
105105
NativeModuleEnv::InitializeCodeCache();
106106

107107
diff --git a/src/node.h b/src/node.h
108-
index aadb60ea557f43a0e1c942183fb14dc915248e59..9dc4c199ca8a9650473bc6d16238e55b3bfd6fd0 100644
108+
index 886216e2cb533e7337bc4f6816e2de796f64f81e..19d5eff164a543a38b4c77f99c2f15c30a226f77 100644
109109
--- a/src/node.h
110110
+++ b/src/node.h
111-
@@ -203,6 +203,9 @@ namespace node {
111+
@@ -211,6 +211,9 @@ namespace node {
112112

113113
class IsolateData;
114114
class Environment;

patches/node/fix_--perf-prof_only_works_on_linux.patch

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)
X Tutup