patches: bump to 12.22.7, 14.18.1 and 16.11.1

This commit is contained in:
Jesse Chan 2021-10-12 18:56:26 -07:00
parent 30cfa750cd
commit 81dfe65b76
4 changed files with 32 additions and 40 deletions

View File

@ -161,7 +161,7 @@
options.execPath = options.execPath || process.execPath;
options.shell = false;
- return spawnWithSignal(options.execPath, args, options);
- return spawn(options.execPath, args, options);
+ return module.exports.spawn(options.execPath, args, options);
}
@ -229,7 +229,7 @@ index 0000000000..fb2d47f52b
// Patch the process object with legacy properties and normalizations
patchProcessObject(expandArgv1);
setupTraceCategoryState();
@@ -87,7 +92,7 @@ function patchProcessObject(expandArgv1) {
@@ -88,7 +93,7 @@ function patchProcessObject(expandArgv1) {
process.argv[0] = process.execPath;
if (expandArgv1 && process.argv[1] &&
@ -282,15 +282,7 @@ index 0000000000..fb2d47f52b
}
--- node/node.gyp
+++ node/node.gyp
@@ -31,6 +31,7 @@
'lib/internal/bootstrap/environment.js',
'lib/internal/bootstrap/loaders.js',
'lib/internal/bootstrap/node.js',
+ 'lib/internal/bootstrap/pkg.js',
'lib/internal/bootstrap/pre_execution.js',
'lib/internal/bootstrap/switches/does_own_process_state.js',
'lib/internal/bootstrap/switches/does_not_own_process_state.js',
@@ -446,6 +447,19 @@
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
@ -312,7 +304,7 @@ index 0000000000..fb2d47f52b
'Dbghelp.lib',
--- node/src/inspector_agent.cc
+++ node/src/inspector_agent.cc
@@ -684,8 +684,6 @@ bool Agent::Start(const std::string& path,
@@ -683,8 +683,6 @@ bool Agent::Start(const std::string& path,
StartIoThreadAsyncCallback));
uv_unref(reinterpret_cast<uv_handle_t*>(&start_io_thread_async));
start_io_thread_async.data = this;
@ -323,7 +315,7 @@ index 0000000000..fb2d47f52b
Environment* env = static_cast<Environment*>(data);
--- node/src/node.cc
+++ node/src/node.cc
@@ -381,6 +381,9 @@ MaybeLocal<Value> Environment::BootstrapNode() {
@@ -386,6 +386,9 @@ MaybeLocal<Value> Environment::BootstrapNode() {
return scope.EscapeMaybe(result);
}
@ -333,7 +325,7 @@ index 0000000000..fb2d47f52b
MaybeLocal<Value> Environment::RunBootstrapping() {
EscapableHandleScope scope(isolate_);
@@ -404,6 +407,8 @@ MaybeLocal<Value> Environment::RunBootstrapping() {
@@ -409,6 +412,8 @@ MaybeLocal<Value> Environment::RunBootstrapping() {
set_has_run_bootstrapping_code(true);
@ -342,7 +334,7 @@ index 0000000000..fb2d47f52b
return scope.Escape(result);
}
@@ -568,13 +573,6 @@ static struct {
@@ -573,13 +578,6 @@ static struct {
inline void PlatformInit() {
#ifdef __POSIX__
@ -356,7 +348,7 @@ index 0000000000..fb2d47f52b
// Make sure file descriptors 0-2 are valid before we start logging anything.
for (auto& s : stdio) {
const int fd = &s - stdio;
@@ -590,10 +588,6 @@ inline void PlatformInit() {
@@ -595,10 +593,6 @@ inline void PlatformInit() {
ABORT();
}
@ -377,7 +369,7 @@ index 0000000000..fb2d47f52b
using v8::Value;
using v8::WeakCallbackInfo;
using v8::WeakCallbackType;
@@ -686,11 +687,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -691,11 +692,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
Local<ArrayBufferView> cached_data_buf;
bool produce_cached_data = false;
Local<Context> parsing_context = context;
@ -391,7 +383,7 @@ index 0000000000..fb2d47f52b
CHECK(args[2]->IsNumber());
line_offset = args[2].As<Integer>();
CHECK(args[3]->IsNumber());
@@ -709,6 +711,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -714,6 +716,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
CHECK_NOT_NULL(sandbox);
parsing_context = sandbox->context();
}
@ -399,7 +391,7 @@ index 0000000000..fb2d47f52b
} else {
line_offset = Integer::New(isolate, 0);
column_offset = Integer::New(isolate, 0);
@@ -763,6 +766,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -768,6 +771,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
ShouldNotAbortOnUncaughtScope no_abort_scope(env);
Context::Scope scope(parsing_context);
@ -410,7 +402,7 @@ index 0000000000..fb2d47f52b
MaybeLocal<UnboundScript> v8_script = ScriptCompiler::CompileUnboundScript(
isolate,
&source,
@@ -779,6 +786,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -784,6 +791,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
contextify_script);
return;
}
@ -424,7 +416,7 @@ index 0000000000..fb2d47f52b
contextify_script->script_.Reset(isolate, v8_script.ToLocalChecked());
Local<Context> env_context = env->context();
@@ -805,6 +819,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -810,6 +824,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
env->cached_data_produced_string(),
Boolean::New(isolate, cached_data_produced)).Check();
}
@ -535,7 +527,7 @@ index 0000000000..fb2d47f52b
+}
--- node/src/node_options.cc
+++ node/src/node_options.cc
@@ -232,6 +232,7 @@ void Parse(
@@ -236,6 +236,7 @@ void Parse(
// TODO(addaleax): Make that unnecessary.
DebugOptionsParser::DebugOptionsParser() {

View File

@ -11,7 +11,7 @@
}],
--- node/deps/v8/include/v8.h
+++ node/deps/v8/include/v8.h
@@ -10053,6 +10053,10 @@ class V8_EXPORT V8 {
@@ -10092,6 +10092,10 @@ class V8_EXPORT V8 {
char** argv,
bool remove_flags);
@ -24,7 +24,7 @@
--- node/deps/v8/src/api/api.cc
+++ node/deps/v8/src/api/api.cc
@@ -640,6 +640,29 @@ void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) {
@@ -647,6 +647,29 @@ void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) {
HelpOptions(HelpOptions::kDontExit));
}
@ -56,10 +56,10 @@
RegisteredExtension::RegisteredExtension(std::unique_ptr<Extension> extension)
--- node/deps/v8/src/codegen/compiler.cc
+++ node/deps/v8/src/codegen/compiler.cc
@@ -2832,7 +2832,7 @@ MaybeHandle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
maybe_result = compilation_cache->LookupScript(
source, script_details.name_obj, script_details.line_offset,
script_details.column_offset, origin_options, language_mode);
@@ -2840,7 +2840,7 @@ MaybeHandle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
// First check per-isolate compilation cache.
maybe_result =
compilation_cache->LookupScript(source, script_details, language_mode);
- if (!maybe_result.is_null()) {
+ if (!maybe_result.is_null() && source_length) {
compile_timer.set_hit_isolate_cache();
@ -67,7 +67,7 @@
compile_timer.set_consuming_code_cache();
--- node/deps/v8/src/objects/js-function.cc
+++ node/deps/v8/src/objects/js-function.cc
@@ -954,6 +954,9 @@ Handle<String> JSFunction::ToString(Handle<JSFunction> function) {
@@ -953,6 +953,9 @@ Handle<String> JSFunction::ToString(Handle<JSFunction> function) {
Handle<Object> maybe_class_positions = JSReceiver::GetDataProperty(
function, isolate->factory()->class_positions_symbol());
if (maybe_class_positions->IsClassPositions()) {
@ -79,8 +79,8 @@
int start_position = class_positions.start();
--- node/deps/v8/src/objects/shared-function-info-inl.h
+++ node/deps/v8/src/objects/shared-function-info-inl.h
@@ -569,6 +569,14 @@ bool SharedFunctionInfo::ShouldFlushBytecode(BytecodeFlushMode mode) {
Object data = function_data(kAcquireLoad);
@@ -631,6 +631,14 @@ bool SharedFunctionInfo::ShouldFlushCode(
}
if (!data.IsBytecodeArray()) return false;
+ Object script_obj = script();
@ -91,7 +91,7 @@
+ }
+ }
+
if (mode == BytecodeFlushMode::kStressFlushBytecode) return true;
if (IsStressFlushingEnabled(code_flush_mode)) return true;
BytecodeArray bytecode = BytecodeArray::cast(data);
--- node/deps/v8/src/parsing/parsing.cc
@ -114,7 +114,7 @@
std::unique_ptr<Utf16CharacterStream> stream(
--- node/deps/v8/src/snapshot/code-serializer.cc
+++ node/deps/v8/src/snapshot/code-serializer.cc
@@ -444,12 +444,10 @@ SerializedCodeData::SanityCheckResult SerializedCodeData::SanityCheck(
@@ -471,12 +471,10 @@ SerializedCodeData::SanityCheckResult SerializedCodeData::SanityCheck(
uint32_t magic_number = GetMagicNumber();
if (magic_number != kMagicNumber) return MAGIC_NUMBER_MISMATCH;
uint32_t version_hash = GetHeaderValue(kVersionHashOffset);
@ -188,7 +188,7 @@ index 0000000000..fb2d47f52b
+}());
--- node/lib/internal/bootstrap/pre_execution.js
+++ node/lib/internal/bootstrap/pre_execution.js
@@ -19,7 +19,12 @@ const { Buffer } = require('buffer');
@@ -20,7 +20,12 @@ const { Buffer } = require('buffer');
const { ERR_MANIFEST_ASSERT_INTEGRITY } = require('internal/errors').codes;
const assert = require('internal/assert');
@ -201,7 +201,7 @@ index 0000000000..fb2d47f52b
// TODO(joyeecheung): this is also necessary for workers when they deserialize
// this toggle from the snapshot.
reconnectZeroFillToggle();
@@ -101,7 +106,8 @@ function patchProcessObject(expandArgv1) {
@@ -102,7 +107,8 @@ function patchProcessObject(expandArgv1) {
process.argv[0] = process.execPath;
if (expandArgv1 && process.argv[1] &&
@ -255,7 +255,7 @@ index 0000000000..fb2d47f52b
}
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
@@ -1165,6 +1165,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
@ -277,7 +277,7 @@ index 0000000000..fb2d47f52b
'Dbghelp.lib',
--- node/src/inspector_agent.cc
+++ node/src/inspector_agent.cc
@@ -681,8 +681,6 @@ bool Agent::Start(const std::string& path,
@@ -680,8 +680,6 @@ bool Agent::Start(const std::string& path,
StartIoThreadAsyncCallback));
uv_unref(reinterpret_cast<uv_handle_t*>(&start_io_thread_async));
start_io_thread_async.data = this;

View File

@ -1,7 +1,7 @@
{
"v16.8.0": ["node.v16.8.0.cpp.patch"],
"v14.17.6": ["node.v14.17.6.cpp.patch"],
"v12.22.6": ["node.v12.22.6.cpp.patch"],
"v16.11.1": ["node.v16.11.1.cpp.patch"],
"v14.18.1": ["node.v14.18.1.cpp.patch"],
"v12.22.7": ["node.v12.22.7.cpp.patch"],
"v10.24.1": ["node.v10.24.1.cpp.patch"],
"v8.17.0": ["node.v8.17.0.cpp.patch"]
}