chore: bump chromium to 9b2191ea59cba1e2f6da4dbb7dee0 (master) (#25995)

This commit is contained in:
Electron Bot 2020-10-27 17:33:04 -07:00 committed by GitHub
parent 284c1b9539
commit bf89237f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 441 additions and 610 deletions

View file

@ -7,5 +7,4 @@ workaround_an_undefined_symbol_error.patch
do_not_export_private_v8_symbols_on_windows.patch
revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch
fix_build_deprecated_attirbute_for_older_msvc_versions.patch
chore_add_v8_apple_silicon_patches.patch
fix_use_proper_page_size_for_mac_arm64.patch

View file

@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side.
diff --git a/include/v8.h b/include/v8.h
index b63cce199188f20c3d35c43f26774632d415d445..59b3939dda57facfffc18c3a7096918649a6ea4a 100644
index 9cd2d451031f6bba582d17c9c468404a827d30a6..d11c9d7bd24560fac1ff6c1869ececb1cd0e7b31 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5139,6 +5139,13 @@ class V8_EXPORT ArrayBuffer : public Object {
@@ -5152,6 +5152,13 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
virtual void* AllocateUninitialized(size_t length) = 0;
@ -30,10 +30,10 @@ index b63cce199188f20c3d35c43f26774632d415d445..59b3939dda57facfffc18c3a70969186
* Free the memory block of size |length|, pointed to by |data|.
* That memory is guaranteed to be previously allocated by |Allocate|.
diff --git a/src/api/api.cc b/src/api/api.cc
index 482ab1933f76878d1087fced4a1f8dbda4839a6f..d1632be48cb7237fc4d0242034bc30b3c3fb03bd 100644
index bd956f1d62f53ba703d530bc0349c05847739609..84765e2c77723279061e6581e209028db7d7c16a 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -536,6 +536,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
@@ -538,6 +538,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
i::V8::SetSnapshotBlob(snapshot_blob);
}

View file

@ -9,10 +9,10 @@ necessary for native modules to load.
Also, some fixes relating to mksnapshot on ARM.
diff --git a/BUILD.gn b/BUILD.gn
index 6d0ab72ad3fa9d5c3d5731643d7c31ed2dcb9a44..ab11ae7c1b1c36df349ff581d12e020718ddd9f4 100644
index 12f776c76f194e54bed45e014b18c6acedd6239d..cd93c9e860057e5ccdeb0bd9a66ff61b518a8a2f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -428,7 +428,7 @@ config("internal_config") {
@@ -422,7 +422,7 @@ config("internal_config") {
":v8_header_features",
]
@ -21,7 +21,7 @@ index 6d0ab72ad3fa9d5c3d5731643d7c31ed2dcb9a44..ab11ae7c1b1c36df349ff581d12e0207
defines += [ "BUILDING_V8_SHARED" ]
}
}
@@ -4524,7 +4524,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -4541,7 +4541,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -30,7 +30,7 @@ index 6d0ab72ad3fa9d5c3d5731643d7c31ed2dcb9a44..ab11ae7c1b1c36df349ff581d12e0207
deps = [
":v8_libbase",
@@ -4561,6 +4561,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -4578,6 +4578,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

View file

@ -1,134 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <marshallofsound@electronjs.org>
Date: Mon, 6 Jul 2020 20:47:43 -0700
Subject: chore: add v8 apple silicon patches
Once these are available upstream we can remove this patch.
diff --git a/src/codegen/arm64/macro-assembler-arm64.cc b/src/codegen/arm64/macro-assembler-arm64.cc
index fef1758aaa81a85009461839ec9aa816e7d196a6..c0f7a1cf5fd4787896b06bce911aabf17b290e88 100644
--- a/src/codegen/arm64/macro-assembler-arm64.cc
+++ b/src/codegen/arm64/macro-assembler-arm64.cc
@@ -2975,6 +2975,35 @@ void TurboAssembler::PrintfNoPreserve(const char* format,
int arg_count = kPrintfMaxArgCount;
+#if V8_OS_MACOSX && !USE_SIMULATOR
+ CPURegList tmp_list = kCallerSaved;
+ tmp_list.Remove(x0); // Used to pass the format string.
+ tmp_list.Remove(arg0, arg1, arg2, arg3);
+
+ // Override the MacroAssembler's scratch register list. The lists will be
+ // reset automatically at the end of the UseScratchRegisterScope.
+ UseScratchRegisterScope temps(this);
+ TmpList()->set_list(tmp_list.list());
+
+ VRegister temp_D = temps.AcquireD();
+
+ // https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html#//apple_ref/doc/uid/TP40013702-SW1
+ Claim(kPrintfMaxArgCount, 8);
+ int64_t offset = 0;
+ for (unsigned i = 0; i < kPrintfMaxArgCount; i++) {
+ CPURegister arg = args[i];
+ if (arg.IsNone()) {
+ break;
+ }
+ if (arg.IsS()) {
+ fcvt(temp_D, arg.S());
+ arg = temp_D;
+ }
+ // FIXME: Use stp.
+ str(arg, MemOperand(sp, offset, Offset));
+ offset += 8;
+ }
+#else
// The PCS varargs registers for printf. Note that x0 is used for the printf
// format string.
static const CPURegList kPCSVarargs =
@@ -3085,7 +3114,7 @@ void TurboAssembler::PrintfNoPreserve(const char* format,
}
#endif
}
-
+#endif
// Load the format string into x0, as per the procedure-call standard.
//
// To make the code as portable as possible, the format string is encoded
@@ -3107,6 +3136,10 @@ void TurboAssembler::PrintfNoPreserve(const char* format,
}
CallPrintf(arg_count, pcs);
+
+#if V8_OS_MACOSX && !USE_SIMULATOR
+ Drop(kPrintfMaxArgCount, 8);
+#endif
}
void TurboAssembler::CallPrintf(int arg_count, const CPURegister* args) {
diff --git a/src/compiler/backend/arm64/instruction-selector-arm64.cc b/src/compiler/backend/arm64/instruction-selector-arm64.cc
index 78ae11f0d17c156b3debd1d501a22edc42c9fff5..564e6a1a71073727fe6daa847093c556c532620b 100644
--- a/src/compiler/backend/arm64/instruction-selector-arm64.cc
+++ b/src/compiler/backend/arm64/instruction-selector-arm64.cc
@@ -1905,6 +1905,7 @@ void InstructionSelector::EmitPrepareArguments(
// Poke the arguments into the stack.
while (slot >= 0) {
+ // FIXME: In the Apple ARM64 ABI parameters should be packed on the stack.
PushParameter input0 = (*arguments)[slot];
PushParameter input1 = slot > 0 ? (*arguments)[slot - 1] : PushParameter();
// Emit a poke-pair if consecutive parameters have the same type.
diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h
index 3137eb2ad31847efb9a0c526a2e0f84209d71cfe..723845eee8439f6dc8b5d1de3cc578ecdd1d3e99 100644
--- a/src/flags/flag-definitions.h
+++ b/src/flags/flag-definitions.h
@@ -776,7 +776,12 @@ DEFINE_INT(wasm_num_compilation_tasks, 128,
"maximum number of parallel compilation tasks for wasm")
DEFINE_DEBUG_BOOL(trace_wasm_native_heap, false,
"trace wasm native heap events")
-DEFINE_BOOL(wasm_write_protect_code_memory, false,
+#if V8_OS_MACOSX && V8_TARGET_ARCH_ARM64
+#define V8_DEFAULT_WASM_WRITE_PROTECT_CODE_MEMORY true
+#else
+#define V8_DEFAULT_WASM_WRITE_PROTECT_CODE_MEMORY false
+#endif
+DEFINE_BOOL(wasm_write_protect_code_memory, V8_DEFAULT_WASM_WRITE_PROTECT_CODE_MEMORY,
"write protect code memory on the wasm native heap")
DEFINE_DEBUG_BOOL(trace_wasm_serialization, false,
"trace serialization/deserialization")
diff --git a/src/wasm/function-compiler.cc b/src/wasm/function-compiler.cc
index 5c35f69f2af2199025dddfa577564996dbb6145f..a4e6b0128e909d371d0ede3627494002e281d547 100644
--- a/src/wasm/function-compiler.cc
+++ b/src/wasm/function-compiler.cc
@@ -258,6 +258,7 @@ void WasmCompilationUnit::CompileWasmFunction(Isolate* isolate,
isolate->counters(), detected);
if (result.succeeded()) {
WasmCodeRefScope code_ref_scope;
+ NativeModuleModificationScope native_module_modification_scope(native_module);
native_module->PublishCode(
native_module->AddCompiledCode(std::move(result)));
} else {
diff --git a/src/wasm/wasm-code-manager.h b/src/wasm/wasm-code-manager.h
index 5e8ed5475bb064cb657069242ce7517de7f5f8e2..5652bb407da3646e55c42492b3e9facec4556367 100644
--- a/src/wasm/wasm-code-manager.h
+++ b/src/wasm/wasm-code-manager.h
@@ -886,7 +886,7 @@ class V8_EXPORT_PRIVATE WasmCodeManager final {
// and even if we did, the resulting set of pages may be fragmented.
// Currently, we try and keep the number of syscalls low.
// - similar argument for debug time.
-class NativeModuleModificationScope final {
+class V8_EXPORT_PRIVATE NativeModuleModificationScope final {
public:
explicit NativeModuleModificationScope(NativeModule* native_module);
~NativeModuleModificationScope();
diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc
index 0666f88619b9e724fe79d8fad817b8acf99a01b7..5274cad0d0aed50bbdea66ff1666af556d994879 100644
--- a/src/wasm/wasm-objects.cc
+++ b/src/wasm/wasm-objects.cc
@@ -1512,6 +1512,7 @@ void WasmInstanceObject::ImportWasmJSFunctionIntoTable(
wasm::WasmCompilationResult result = compiler::CompileWasmImportCallWrapper(
isolate->wasm_engine(), &env, kind, sig, false,
shared.internal_formal_parameter_count());
+ wasm::NativeModuleModificationScope native_module_modification_scope(native_module);
std::unique_ptr<wasm::WasmCode> wasm_code = native_module->AddCode(
result.func_index, result.code_desc, result.frame_slot_count,
result.tagged_parameter_slots,

View file

@ -6,10 +6,10 @@ Subject: dcheck.patch
https://github.com/auchenberg/volkswagen
diff --git a/src/api/api.cc b/src/api/api.cc
index d1632be48cb7237fc4d0242034bc30b3c3fb03bd..10b3f57ce2f79147f3d5795b94c07a0c5f3bad91 100644
index 84765e2c77723279061e6581e209028db7d7c16a..432a79b2d51863727edb88638276e4c7c1b70342 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -8809,7 +8809,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -8811,7 +8811,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::PerformMicrotaskCheckpoint() {
@ -19,10 +19,10 @@ index d1632be48cb7237fc4d0242034bc30b3c3fb03bd..10b3f57ce2f79147f3d5795b94c07a0c
isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index c60ae367c24be4ca7445233671784dcd2d89d697..5898f6fd8f92da3034f5227ce5dc5091642307c0 100644
index 3efcd9412715a7de46ede444ed89b3e0dfd96e68..2d0026f3be7f422eced8eb14697bebe5f634a2e8 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5540,9 +5540,9 @@ void Heap::TearDown() {
@@ -5450,9 +5450,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);

View file

@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index 04ad7b8510dbbdce3b52cba710f5dafee2a7c03e..54ecd3bc6d1caf5b11c19a0d8559636df64b4d82 100644
index ff13e8ca7fc0de9c24449e39d0e9056c399f4797..dd0a2abed165d0eb3583e3171da73b156cb28872 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -428,6 +428,10 @@ config("internal_config") {
@@ -422,6 +422,10 @@ config("internal_config") {
":v8_header_features",
]

View file

@ -19,7 +19,7 @@ index 70efa0136023b47bcf054c3414170dff32be01dd..f967a2b62fe19d5f729bece878e0d93f
explicit inline Relocatable(Isolate* isolate);
inline virtual ~Relocatable();
diff --git a/src/objects/ordered-hash-table.h b/src/objects/ordered-hash-table.h
index 5f3c45a110aa48cf7c9c189d0e37e07193f06b75..01bfb2a73dbfb6d5a5d41baea946c783abfd1558 100644
index 0dfc50d7e0484c3f9fb170ac28027d642f64ce13..f81b0e3e2cf9b368522916de643b416d2e0a5999 100644
--- a/src/objects/ordered-hash-table.h
+++ b/src/objects/ordered-hash-table.h
@@ -60,7 +60,7 @@ namespace internal {

View file

@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index ab11ae7c1b1c36df349ff581d12e020718ddd9f4..04ad7b8510dbbdce3b52cba710f5dafee2a7c03e 100644
index cd93c9e860057e5ccdeb0bd9a66ff61b518a8a2f..ff13e8ca7fc0de9c24449e39d0e9056c399f4797 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -4535,7 +4535,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -4552,7 +4552,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View file

@ -9,7 +9,7 @@ higher versions, but native module compiling with this version
will have an issue.
diff --git a/include/v8config.h b/include/v8config.h
index a047874c4064f651d4dda64e15fc1507990fcab4..52546a0b74c9a7d8d2df6afe7ac61987f67b130c 100644
index ae89edb2c9b791abd0aa2662fc7b4f3bc431b146..fdf2a690d50bb7835ce584b3b8940ed919b29b75 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -391,10 +391,13 @@

View file

@ -6,11 +6,11 @@ Subject: Revert "[cleanup] Switch {OFFSET_OF} to {offsetof} where possible."
This reverts commit d287e4bc46243841c77cf9798516ee4dcc54bf43.
diff --git a/src/deoptimizer/deoptimizer.h b/src/deoptimizer/deoptimizer.h
index 152e5e510e9bb030a0c4ab489750573488bac7a6..1adc3f1eeb856ca5cee9acc4723e9003d069fe3a 100644
index 5f438ada7635f622c4f102cd6114f7e6f2ba56bc..a18f4bfea7f529d16c486fcf6a96255be792a92c 100644
--- a/src/deoptimizer/deoptimizer.h
+++ b/src/deoptimizer/deoptimizer.h
@@ -508,14 +508,14 @@ class Deoptimizer : public Malloced {
DeoptimizeKind* type);
@@ -509,14 +509,14 @@ class Deoptimizer : public Malloced {
DeoptimizeKind* type_out);
// Code generation support.
- static int input_offset() { return offsetof(Deoptimizer, input_); }
@ -28,7 +28,7 @@ index 152e5e510e9bb030a0c4ab489750573488bac7a6..1adc3f1eeb856ca5cee9acc4723e9003
}
V8_EXPORT_PRIVATE static int GetDeoptimizedCodeCount(Isolate* isolate);
@@ -776,11 +776,11 @@ class FrameDescription {
@@ -771,11 +771,11 @@ class FrameDescription {
int parameter_count() { return parameter_count_; }
static int registers_offset() {