Skip to content

Commit 7784d25

Browse files
electron-roller[bot]jkleinsccodebyteredeepak1556
authored
chore: bump node to v22.22.0 (39-x-y) (#49389)
* chore: bump node in DEPS to v22.22.0 * chore: update patches * chore: fixup sandboxed pointers patch (cherry picked from commit f52fbdb) * chore: fixup v8 sandbox pointers node patch * tls: route callback exceptions through error handlers https://github.com/nodejs-private/node-private/pull/782 (cherry picked from commit 87bc8eb) * chore:remove zero-fill sandbox patch component xref #49452 * fixup! chore:remove zero-fill sandbox patch component * test: correct conditional secure heap flags test xref: nodejs/node#60385 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
1 parent 126a32c commit 7784d25

14 files changed

Lines changed: 1023 additions & 116 deletions

‎DEPS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vars = {
44
'chromium_version':
55
'142.0.7444.265',
66
'node_version':
7-
'v22.21.1',
7+
'v22.22.0',
88
'nan_version':
99
'e14bdcd1f72d62bca1d541b66da43130384ec213',
1010
'squirrel.mac_version':

‎patches/node/.patches‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ fix_redefined_macos_sdk_header_symbols.patch
5454
src_use_cp_utf8_for_wide_file_names_on_win32.patch
5555
fix_ensure_traverseparent_bails_on_resource_path_exit.patch
5656
src_handle_der_decoding_errors_from_system_certificates.patch
57+
remove_obsolete_noarraybufferzerofillscope.patch
58+
src_prepare_for_v8_sandboxing.patch
59+
test_correct_conditional_secure_heap_flags_test.patch

‎patches/node/api_remove_deprecated_getisolate.patch‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Subject: Remove deprecated `GetIsolate`
66
https://chromium-review.googlesource.com/c/v8/v8/+/6905244
77

88
diff --git a/src/api/environment.cc b/src/api/environment.cc
9-
index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7c630fddf 100644
9+
index ceac508418f489a8077c1bc85a2feaf85bf60480..33827edce63c9fe08b52aea59571391a83853443 100644
1010
--- a/src/api/environment.cc
1111
+++ b/src/api/environment.cc
12-
@@ -654,7 +654,7 @@ std::unique_ptr<MultiIsolatePlatform> MultiIsolatePlatform::Create(
12+
@@ -646,7 +646,7 @@ std::unique_ptr<MultiIsolatePlatform> MultiIsolatePlatform::Create(
1313

1414
MaybeLocal<Object> GetPerContextExports(Local<Context> context,
1515
IsolateData* isolate_data) {
@@ -18,7 +18,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7
1818
EscapableHandleScope handle_scope(isolate);
1919

2020
Local<Object> global = context->Global();
21-
@@ -700,7 +700,7 @@ void ProtoThrower(const FunctionCallbackInfo<Value>& info) {
21+
@@ -692,7 +692,7 @@ void ProtoThrower(const FunctionCallbackInfo<Value>& info) {
2222
// This runs at runtime, regardless of whether the context
2323
// is created from a snapshot.
2424
Maybe<void> InitializeContextRuntime(Local<Context> context) {
@@ -27,7 +27,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7
2727
HandleScope handle_scope(isolate);
2828

2929
// When `IsCodeGenerationFromStringsAllowed` is true, V8 takes the fast path
30-
@@ -779,7 +779,7 @@ Maybe<void> InitializeContextRuntime(Local<Context> context) {
30+
@@ -771,7 +771,7 @@ Maybe<void> InitializeContextRuntime(Local<Context> context) {
3131
}
3232

3333
Maybe<void> InitializeBaseContextForSnapshot(Local<Context> context) {
@@ -36,7 +36,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7
3636
HandleScope handle_scope(isolate);
3737

3838
// Delete `Intl.v8BreakIterator`
39-
@@ -804,7 +804,7 @@ Maybe<void> InitializeBaseContextForSnapshot(Local<Context> context) {
39+
@@ -796,7 +796,7 @@ Maybe<void> InitializeBaseContextForSnapshot(Local<Context> context) {
4040
}
4141

4242
Maybe<void> InitializeMainContextForSnapshot(Local<Context> context) {
@@ -45,7 +45,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7
4545
HandleScope handle_scope(isolate);
4646

4747
// Initialize the default values.
48-
@@ -822,7 +822,7 @@ Maybe<void> InitializeMainContextForSnapshot(Local<Context> context) {
48+
@@ -814,7 +814,7 @@ Maybe<void> InitializeMainContextForSnapshot(Local<Context> context) {
4949
MaybeLocal<Object> InitializePrivateSymbols(Local<Context> context,
5050
IsolateData* isolate_data) {
5151
CHECK(isolate_data);
@@ -54,7 +54,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7
5454
EscapableHandleScope scope(isolate);
5555
Context::Scope context_scope(context);
5656

57-
@@ -846,7 +846,7 @@ MaybeLocal<Object> InitializePrivateSymbols(Local<Context> context,
57+
@@ -838,7 +838,7 @@ MaybeLocal<Object> InitializePrivateSymbols(Local<Context> context,
5858
MaybeLocal<Object> InitializePerIsolateSymbols(Local<Context> context,
5959
IsolateData* isolate_data) {
6060
CHECK(isolate_data);
@@ -63,7 +63,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7
6363
EscapableHandleScope scope(isolate);
6464
Context::Scope context_scope(context);
6565

66-
@@ -872,7 +872,7 @@ MaybeLocal<Object> InitializePerIsolateSymbols(Local<Context> context,
66+
@@ -864,7 +864,7 @@ MaybeLocal<Object> InitializePerIsolateSymbols(Local<Context> context,
6767
Maybe<void> InitializePrimordials(Local<Context> context,
6868
IsolateData* isolate_data) {
6969
// Run per-context JS files.
@@ -508,10 +508,10 @@ index 492d5f455f45a5c8a957ecdabed38709a633f640..48f9917113555c7ed87e37750c45d152
508508
Local<Array> keys;
509509
if (!entries->GetOwnPropertyNames(context).ToLocal(&keys))
510510
diff --git a/src/node_errors.cc b/src/node_errors.cc
511-
index 4386a1bc5678e351ce084cd2c47202561619b164..8d51201ad24999ed8f54e16c7878432d41841cf2 100644
511+
index 36a21b9523351fe2f225ffe7fca184d737640b62..c6e9e2c00064348c435ae10871a4013cb49376e6 100644
512512
--- a/src/node_errors.cc
513513
+++ b/src/node_errors.cc
514-
@@ -633,7 +633,7 @@ v8::ModifyCodeGenerationFromStringsResult ModifyCodeGenerationFromStrings(
514+
@@ -631,7 +631,7 @@ v8::ModifyCodeGenerationFromStringsResult ModifyCodeGenerationFromStrings(
515515
v8::Local<v8::Context> context,
516516
v8::Local<v8::Value> source,
517517
bool is_code_like) {
@@ -520,7 +520,7 @@ index 4386a1bc5678e351ce084cd2c47202561619b164..8d51201ad24999ed8f54e16c7878432d
520520

521521
if (context->GetNumberOfEmbedderDataFields() <=
522522
ContextEmbedderIndex::kAllowCodeGenerationFromStrings) {
523-
@@ -1000,7 +1000,7 @@ const char* errno_string(int errorno) {
523+
@@ -1037,7 +1037,7 @@ const char* errno_string(int errorno) {
524524
}
525525

526526
void PerIsolateMessageListener(Local<Message> message, Local<Value> error) {
@@ -529,7 +529,7 @@ index 4386a1bc5678e351ce084cd2c47202561619b164..8d51201ad24999ed8f54e16c7878432d
529529
switch (message->ErrorLevel()) {
530530
case Isolate::MessageErrorLevel::kMessageWarning: {
531531
Environment* env = Environment::GetCurrent(isolate);
532-
@@ -1161,7 +1161,7 @@ void Initialize(Local<Object> target,
532+
@@ -1198,7 +1198,7 @@ void Initialize(Local<Object> target,
533533
SetMethod(
534534
context, target, "getErrorSourcePositions", GetErrorSourcePositions);
535535

@@ -640,7 +640,7 @@ index 66a8ee48fc68b22eaf6c9d9209cc5cb2439e55ff..b31e244f8af7d37c35319853a478776c
640640
env->AssignToContext(context, this, ContextInfo(""));
641641
}
642642
diff --git a/src/node_report.cc b/src/node_report.cc
643-
index 8ff711f12e19f73e50daac2b9c0fd26773d32758..6966710e8f0be542364850776ddf76f9223a02e7 100644
643+
index e1f4e30417d17f85d2294f3a01e6d90f0a443948..12a59307b452b0d67ebe909cae0458b8a0ca085b 100644
644644
--- a/src/node_report.cc
645645
+++ b/src/node_report.cc
646646
@@ -399,7 +399,7 @@ static void PrintJavaScriptErrorProperties(JSONWriter* writer,

‎patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
88
of this.
99

1010
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
11-
index d12d21905c4823f45cffeea4423e99e81b1008f5..4987cd3f6c9eefb440bca3f58113df6cd5b410ac 100644
11+
index 15443a710ccf53fae333da3b1fbb52a970c658d5..464b34829c1a566836bfca6bbc2b87fcf5e50016 100644
1212
--- a/lib/internal/process/pre_execution.js
1313
+++ b/lib/internal/process/pre_execution.js
14-
@@ -267,12 +267,14 @@ function patchProcessObject(expandArgv1) {
14+
@@ -265,12 +265,14 @@ function patchProcessObject(expandArgv1) {
1515
// the entry point.
1616
if (expandArgv1 && process.argv[1] && process.argv[1][0] !== '-') {
1717
// Expand process.argv[1] into a full path.

‎patches/node/fix_remove_deprecated_errno_constants.patch‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ index 0ca643aa74d13f278685d2330b791182b55c15b4..cbcecfba33070b820aca0e2814982160
8686
NODE_DEFINE_CONSTANT(target, ETIMEDOUT);
8787
#endif
8888
diff --git a/src/node_errors.cc b/src/node_errors.cc
89-
index ae8553ee2022d60fea4572976b14ba9cd253aa45..4386a1bc5678e351ce084cd2c47202561619b164 100644
89+
index 238942d45a136facec55ca5a2534e2dc407137e9..36a21b9523351fe2f225ffe7fca184d737640b62 100644
9090
--- a/src/node_errors.cc
9191
+++ b/src/node_errors.cc
92-
@@ -862,10 +862,6 @@ const char* errno_string(int errorno) {
92+
@@ -899,10 +899,6 @@ const char* errno_string(int errorno) {
9393
ERRNO_CASE(ENOBUFS);
9494
#endif
9595

@@ -100,7 +100,7 @@ index ae8553ee2022d60fea4572976b14ba9cd253aa45..4386a1bc5678e351ce084cd2c4720256
100100
#ifdef ENODEV
101101
ERRNO_CASE(ENODEV);
102102
#endif
103-
@@ -904,14 +900,6 @@ const char* errno_string(int errorno) {
103+
@@ -941,14 +937,6 @@ const char* errno_string(int errorno) {
104104
ERRNO_CASE(ENOSPC);
105105
#endif
106106

@@ -115,7 +115,7 @@ index ae8553ee2022d60fea4572976b14ba9cd253aa45..4386a1bc5678e351ce084cd2c4720256
115115
#ifdef ENOSYS
116116
ERRNO_CASE(ENOSYS);
117117
#endif
118-
@@ -994,10 +982,6 @@ const char* errno_string(int errorno) {
118+
@@ -1031,10 +1019,6 @@ const char* errno_string(int errorno) {
119119
ERRNO_CASE(ESTALE);
120120
#endif
121121

‎patches/node/fix_remove_fastapitypedarray_usage.patch‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ index fe669d40c31a29334b047b9cfee3067f64ef0a7b..9e5de7bbe574add017cd12ee091304d0
4848

4949
static CFunction fast_timing_safe_equal(CFunction::Make(FastTimingSafeEqual));
5050
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
51-
index e39852c8e0392e0a9ae5d4ea58be115416e19233..c94b14741c827a81d69a6f036426a344e563ad72 100644
51+
index b9f0c97938203b4652780a7d707c5e83319330b0..8a5b6b57321c2843a965a7e51b2ebed991a1e424 100644
5252
--- a/src/node_buffer.cc
5353
+++ b/src/node_buffer.cc
5454
@@ -44,6 +44,14 @@
@@ -74,7 +74,7 @@ index e39852c8e0392e0a9ae5d4ea58be115416e19233..c94b14741c827a81d69a6f036426a344
7474
using v8::FunctionCallbackInfo;
7575
using v8::Global;
7676
using v8::HandleScope;
77-
@@ -584,19 +591,24 @@ void SlowCopy(const FunctionCallbackInfo<Value>& args) {
77+
@@ -583,19 +590,24 @@ void SlowCopy(const FunctionCallbackInfo<Value>& args) {
7878

7979
// Assume caller has properly validated args.
8080
uint32_t FastCopy(Local<Value> receiver,
@@ -107,7 +107,7 @@ index e39852c8e0392e0a9ae5d4ea58be115416e19233..c94b14741c827a81d69a6f036426a344
107107
return to_copy;
108108
}
109109

110-
@@ -865,19 +877,17 @@ void Compare(const FunctionCallbackInfo<Value> &args) {
110+
@@ -864,19 +876,17 @@ void Compare(const FunctionCallbackInfo<Value> &args) {
111111
}
112112

113113
int32_t FastCompare(v8::Local<v8::Value>,
@@ -135,7 +135,7 @@ index e39852c8e0392e0a9ae5d4ea58be115416e19233..c94b14741c827a81d69a6f036426a344
135135
}
136136

137137
static v8::CFunction fast_compare(v8::CFunction::Make(FastCompare));
138-
@@ -1149,14 +1159,13 @@ void SlowIndexOfNumber(const FunctionCallbackInfo<Value>& args) {
138+
@@ -1148,14 +1158,13 @@ void SlowIndexOfNumber(const FunctionCallbackInfo<Value>& args) {
139139
}
140140

141141
int32_t FastIndexOfNumber(v8::Local<v8::Value>,
@@ -153,7 +153,7 @@ index e39852c8e0392e0a9ae5d4ea58be115416e19233..c94b14741c827a81d69a6f036426a344
153153
}
154154

155155
static v8::CFunction fast_index_of_number(
156-
@@ -1496,21 +1505,31 @@ void SlowWriteString(const FunctionCallbackInfo<Value>& args) {
156+
@@ -1510,21 +1519,31 @@ void SlowWriteString(const FunctionCallbackInfo<Value>& args) {
157157

158158
template <encoding encoding>
159159
uint32_t FastWriteString(Local<Value> receiver,

‎patches/node/fix_replace_deprecated_setprototype.patch‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ This is already applied in newer versions of Node so we can drop
99
this patch once we upgrade to v23.
1010

1111
diff --git a/src/api/environment.cc b/src/api/environment.cc
12-
index 0a358735c331767e8eb563a80e9aaccfb544c27b..d7d18d5fcbf008ac131db189a141315af4f6410b 100644
12+
index 79327877b0f34cbafb3efcc21617027d4011f806..8a12475857135bd3e904610b7eb887c397c8e73c 100644
1313
--- a/src/api/environment.cc
1414
+++ b/src/api/environment.cc
15-
@@ -835,7 +835,7 @@ MaybeLocal<Object> InitializePrivateSymbols(Local<Context> context,
15+
@@ -827,7 +827,7 @@ MaybeLocal<Object> InitializePrivateSymbols(Local<Context> context,
1616

1717
Local<Object> private_symbols_object;
1818
if (!private_symbols->NewInstance(context).ToLocal(&private_symbols_object) ||
@@ -21,7 +21,7 @@ index 0a358735c331767e8eb563a80e9aaccfb544c27b..d7d18d5fcbf008ac131db189a141315a
2121
.IsNothing()) {
2222
return MaybeLocal<Object>();
2323
}
24-
@@ -861,7 +861,7 @@ MaybeLocal<Object> InitializePerIsolateSymbols(Local<Context> context,
24+
@@ -853,7 +853,7 @@ MaybeLocal<Object> InitializePerIsolateSymbols(Local<Context> context,
2525
Local<Object> per_isolate_symbols_object;
2626
if (!per_isolate_symbols->NewInstance(context).ToLocal(
2727
&per_isolate_symbols_object) ||

‎patches/node/refactor_attach_cppgc_heap_on_v8_isolate_creation.patch‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ This can be removed when Node.js upgrades to a version of V8 containing CLs
1818
from the above issue.
1919

2020
diff --git a/src/api/environment.cc b/src/api/environment.cc
21-
index cb37fa080fc8e8d524cfa2758c4a8c2c5652324d..8e227ddd1be50c046a8cf2895a31d607eb7d31de 100644
21+
index fd71ceac65ccef1d2832b45b0b5612877cee22c1..ceac508418f489a8077c1bc85a2feaf85bf60480 100644
2222
--- a/src/api/environment.cc
2323
+++ b/src/api/environment.cc
24-
@@ -316,6 +316,10 @@ Isolate* NewIsolate(Isolate::CreateParams* params,
24+
@@ -308,6 +308,10 @@ Isolate* NewIsolate(Isolate::CreateParams* params,
2525
MultiIsolatePlatform* platform,
2626
const SnapshotData* snapshot_data,
2727
const IsolateSettings& settings) {
@@ -32,7 +32,7 @@ index cb37fa080fc8e8d524cfa2758c4a8c2c5652324d..8e227ddd1be50c046a8cf2895a31d607
3232
Isolate* isolate = Isolate::Allocate();
3333
if (isolate == nullptr) return nullptr;
3434

35-
@@ -359,9 +363,12 @@ Isolate* NewIsolate(ArrayBufferAllocator* allocator,
35+
@@ -351,9 +355,12 @@ Isolate* NewIsolate(ArrayBufferAllocator* allocator,
3636
uv_loop_t* event_loop,
3737
MultiIsolatePlatform* platform,
3838
const EmbedderSnapshotData* snapshot_data,

0 commit comments

Comments
 (0)