59dd17f2cf
* chore: bump chromium in DEPS to 102.0.4975.0 * chore: bump chromium in DEPS to 102.0.4977.0 * chore: update patches * Remove parameter of OnGpuProcessCrashed() https://chromium-review.googlesource.com/c/chromium/src/+/3543396 * hid: Add exclusionFilters option to requestDevice https://chromium-review.googlesource.com/c/chromium/src/+/3478175 * chore: bump chromium in DEPS to 102.0.4979.0 * chore: bump chromium in DEPS to 102.0.4981.0 * chore: update patches * Deny notification/push permission for documents in non-standard StoragePartitions https://chromium-review.googlesource.com/c/chromium/src/+/3257305 * Improve FrameTreeNode tracking in URLLoaderNetworkContext https://chromium-review.googlesource.com/c/chromium/src/+/3341866 * fixup! Remove parameter of OnGpuProcessCrashed() * chore: fix lint * Reland "Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the rest of Chrome" https://chromium-review.googlesource.com/c/chromium/src/+/3554236 * chore: bump chromium in DEPS to 102.0.4983.0 * Ensure EyeDropperView does not access a destroyed window https://chromium-review.googlesource.com/c/chromium/src/+/3561542 * ci: don't delete dawn .git directory 83901: Adds a generated file with the dawn git hash encoded at build time. | https://dawn-review.googlesource.com/c/dawn/+/83901 * ci: update Windows toolchain 3550827: New toolchain for Windows 10 20348 SDK | https://chromium-review.googlesource.com/c/chromium/src/+/3550827 * chore: bump chromium in DEPS to 102.0.4985.0 * chore: update patches * chore: bump chromium in DEPS to 102.0.4987.0 * chore: update patches * 3563432: codehealth: remove uses of DictionaryValue in cbui/webui https://chromium-review.googlesource.com/c/chromium/src/+/3563432 * chore: update patches after rebase * Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the rest of Chrome https://chromium-review.googlesource.com/c/chromium/src/+/3554236 * 3565724: Preserve "proper method names" as-is in error.stack. https://chromium-review.googlesource.com/c/v8/v8/+/3565724 * chore: bump chromium in DEPS to 102.0.4989.0 * chore: update patches * fixup ci: don't delete dawn .git directory for Windows * 3560843: Remove multi-parameter version of gfx::Rect[F]::Inset() https://chromium-review.googlesource.com/c/chromium/src/+/3560843 * 3572711: Remove unused IDS_PDF_TOOLTIP_ROTATE_CW resource. https://chromium-review.googlesource.com/c/chromium/src/+/3572711 * 3572926: Reland "[Sysroot] Switch to Debian Bullseye stable" https://chromium-review.googlesource.com/c/chromium/src/+/3572926 * build: fixup sysroots with electron specific dependencies * fixup Remove multi-parameter version of gfx::Rect[F]::Inset() * fixup 3565724: Preserve "proper method names" as-is in error.stack. * fixup Remove multi-parameter version of gfx::Rect[F]::Inset() * test: add spec for navigator.hid.requestDevice({ exclusionFilters: [...] } * fixup 3565724: Preserve "proper method names" as-is in error.stack. * ci: use python3 to get the windows toolchain profile 3525960: Explicitly run everything with python3 | https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525960 * chore: add diagnostic logging * fix: try calling process.crash() * chore: remove logging Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
77 lines
3.7 KiB
Diff
77 lines
3.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Thu, 20 Sep 2018 17:47:44 -0700
|
|
Subject: gin_enable_disable_v8_platform.patch
|
|
|
|
We don't use gin to create the V8 platform, because we need to inject Node
|
|
things.
|
|
|
|
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
|
index 00190da513499e6275d19bd99b6502db246cd33d..f273749bd026abb287ba33e03208a286e80a57a1 100644
|
|
--- a/gin/isolate_holder.cc
|
|
+++ b/gin/isolate_holder.cc
|
|
@@ -121,9 +121,10 @@ IsolateHolder::~IsolateHolder() {
|
|
void IsolateHolder::Initialize(ScriptMode mode,
|
|
v8::ArrayBuffer::Allocator* allocator,
|
|
const intptr_t* reference_table,
|
|
- const std::string js_command_line_flags) {
|
|
+ const std::string js_command_line_flags,
|
|
+ bool create_v8_platform) {
|
|
CHECK(allocator);
|
|
- V8Initializer::Initialize(mode, js_command_line_flags);
|
|
+ V8Initializer::Initialize(mode, js_command_line_flags, create_v8_platform);
|
|
g_array_buffer_allocator = allocator;
|
|
g_reference_table = reference_table;
|
|
}
|
|
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
|
|
index 1e36669dfb275b8a7c4913c8465bd299c548ed3a..178023d52c9e8ef716ee215e7a243b1800357818 100644
|
|
--- a/gin/public/isolate_holder.h
|
|
+++ b/gin/public/isolate_holder.h
|
|
@@ -102,7 +102,8 @@ class GIN_EXPORT IsolateHolder {
|
|
static void Initialize(ScriptMode mode,
|
|
v8::ArrayBuffer::Allocator* allocator,
|
|
const intptr_t* reference_table = nullptr,
|
|
- const std::string js_command_line_flags = {});
|
|
+ const std::string js_command_line_flags = {},
|
|
+ bool create_v8_platform = true);
|
|
|
|
// Returns whether `Initialize` has already been invoked in the process.
|
|
// Initialization is a one-way operation (i.e., this method cannot return
|
|
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
|
index 6996e07dd19c0fa29fe658c6cb33adc60969e63e..ee480cc557db3bfd4ff9428324151d071ad1f444 100644
|
|
--- a/gin/v8_initializer.cc
|
|
+++ b/gin/v8_initializer.cc
|
|
@@ -351,7 +351,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
|
|
|
// static
|
|
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
|
- const std::string js_command_line_flags) {
|
|
+ const std::string js_command_line_flags,
|
|
+ bool create_v8_platform) {
|
|
static bool v8_is_initialized = false;
|
|
if (v8_is_initialized)
|
|
return;
|
|
@@ -361,7 +362,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
|
// See https://crbug.com/v8/11043
|
|
SetFlags(mode, js_command_line_flags);
|
|
|
|
- v8::V8::InitializePlatform(V8Platform::Get());
|
|
+ if (create_v8_platform)
|
|
+ v8::V8::InitializePlatform(V8Platform::Get());
|
|
|
|
// Set this early on as some initialization steps, such as the initialization
|
|
// of the virtual memory cage, already use V8's random number generator.
|
|
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
|
|
index beeedc5737f6e60dde123200fbb6430a40366577..17ee4c894e89b7d2d12377475a5dd01910b61312 100644
|
|
--- a/gin/v8_initializer.h
|
|
+++ b/gin/v8_initializer.h
|
|
@@ -29,7 +29,8 @@ class GIN_EXPORT V8Initializer {
|
|
public:
|
|
// This should be called by IsolateHolder::Initialize().
|
|
static void Initialize(IsolateHolder::ScriptMode mode,
|
|
- const std::string js_command_line_flags = {});
|
|
+ const std::string js_command_line_flags = {},
|
|
+ bool create_v8_platform = true);
|
|
|
|
// Get address and size information for currently loaded snapshot.
|
|
// If no snapshot is loaded, the return values are null for addresses
|