![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 122.0.6239.2 * chore: update patches * refactor: extensions replaced StringPiece with string_view Ref:5171926
* chore: bump chromium in DEPS to 122.0.6240.0 * chore: update patches * chore: bump chromium in DEPS to 122.0.6241.5 * chore: bump chromium in DEPS to 122.0.6245.0 * chore: bump chromium in DEPS to 122.0.6247.0 * chore: bump chromium in DEPS to 122.0.6249.0 * chore: bump chromium in DEPS to 122.0.6251.0 * 5192010: Rename {absl => std}::optional in //chrome/5192010
* 5109767: CodeHealth: Fix leaked raw_ptr in Linux ProcessSingleton5109767
* 5105227: [media_preview] Show requested device in permission bubble5105227
* chore: bump chromium in DEPS to 122.0.6253.0 * chore: update patches * 5180720: Polish tiled browser window UI on Linux |5180720
* chore: update patches * chore: bump chromium in DEPS to 122.0.6255.0 * chore: update patches * 5186276: [autopip] Make "allow once" per navigation |5186276
* chore: bump chromium in DEPS to 122.0.6257.0 * chore: bump chromium in DEPS to 122.0.6259.0 * chore: update patches * 5190661: Automated T* -> raw_ptr<T> rewrite "refresh" |5190661
* 5206106: Make sure RenderFrameHosts are active when printing |5206106
* 5202674: Reland "Automated T* -> raw_ptr<T> rewrite 'refresh'"5202674
* fixup CodeHealth: Fix leaked raw_ptr in Linux ProcessSingleton5109767
* fixup 5206106: Make sure RenderFrameHosts are active when printing * Make legacy ToV8() helpers private to ScriptPromiseResolver, their only user5207474
* fixup CodeHealth: Fix leaked raw_ptr in Linux ProcessSingleton * fixup 5186276: [autopip] Make "allow once" per navigation5186276
* chore: update patches after rebase * chore: bump chromium in DEPS to 122.0.6260.0 * 5191363: Mark LOG(FATAL) [[noreturn]]5191363
* fixup 5186276: [autopip] Make "allow once" per navigation5186276
* fixup Make legacy ToV8() helpers private to ScriptPromiseResolver5207474
* chore: update patches * chore: bump chromium in DEPS to 122.0.6261.0 * chore: update patches * chore: restore patch that was mistakenly removed * 5181931: Improve LoginHandler (Part 9 / N)5181931
* Dispatch SiteInstanceGotProcess() only when both process and site are set.5142354
* 5171446: [AsyncSB] Pass navigation_id into CreateURLLoaderThrottles5171446
* 5213708: Move DownloadTargetInfo into components/download5213708
* extensions: Add a loader for Controlled Frame embedder scripts5202765
* [CSC][Zoom] Add initial_zoom_level to DisplayMediaInformation5168626
* chore: bump chromium in DEPS to 123.0.6262.0 * chore: bump chromium in DEPS to 122.0.6261.6 * fix: suppress clang -Wimplicit-const-int-float-conversion * fixup 5191363: Mark LOG(FATAL) [[noreturn]] for Windows5191363
* 5167921: Remove Widget::IsTranslucentWindowOpacitySupported5167921
Also 5148392: PinnedState: Support pinned state in PlatformWindowState |5148392
* fixup: 5180720: Polish tiled browser window UI on Linux5180720
* 5170669: clipboard: Migrate DOMException constructors to RejectWith-5170669
* 5178824: [Fullscreen] Record UKM data5178824
* chore: update patches after rebase --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
77 lines
4 KiB
Diff
77 lines
4 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 cdaa098dd404ae477d208375cc4c9ca1b5ac43e4..cb2529a65f62c40e39d7cd4c96e50e1b72abbd53 100644
|
|
--- a/gin/isolate_holder.cc
|
|
+++ b/gin/isolate_holder.cc
|
|
@@ -151,9 +151,10 @@ void IsolateHolder::Initialize(ScriptMode mode,
|
|
const intptr_t* reference_table,
|
|
const std::string js_command_line_flags,
|
|
v8::FatalErrorCallback fatal_error_callback,
|
|
- v8::OOMErrorCallback oom_error_callback) {
|
|
+ v8::OOMErrorCallback oom_error_callback,
|
|
+ bool create_v8_platform) {
|
|
CHECK(allocator);
|
|
- V8Initializer::Initialize(mode, js_command_line_flags, oom_error_callback);
|
|
+ V8Initializer::Initialize(mode, js_command_line_flags, oom_error_callback, create_v8_platform);
|
|
g_array_buffer_allocator = allocator;
|
|
g_reference_table = reference_table;
|
|
g_fatal_error_callback = fatal_error_callback;
|
|
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
|
|
index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7e9057b3c 100644
|
|
--- a/gin/public/isolate_holder.h
|
|
+++ b/gin/public/isolate_holder.h
|
|
@@ -113,7 +113,8 @@ class GIN_EXPORT IsolateHolder {
|
|
const intptr_t* reference_table = nullptr,
|
|
const std::string js_command_line_flags = {},
|
|
v8::FatalErrorCallback fatal_error_callback = nullptr,
|
|
- v8::OOMErrorCallback oom_error_callback = nullptr);
|
|
+ v8::OOMErrorCallback oom_error_callback = nullptr,
|
|
+ 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 0b7fcb2ffd5e1a803b3d9b63e6c4285d32909364..f823cf647d1ae3d57fba3aa7a2325debcdf6050a 100644
|
|
--- a/gin/v8_initializer.cc
|
|
+++ b/gin/v8_initializer.cc
|
|
@@ -451,7 +451,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
|
// static
|
|
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
|
const std::string js_command_line_flags,
|
|
- v8::OOMErrorCallback oom_error_callback) {
|
|
+ v8::OOMErrorCallback oom_error_callback,
|
|
+ bool create_v8_platform) {
|
|
static bool v8_is_initialized = false;
|
|
if (v8_is_initialized)
|
|
return;
|
|
@@ -461,7 +462,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 as early as possible in order to ensure OOM errors are reported
|
|
// correctly.
|
|
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
|
|
index d499cb43c4e12ca32912fce7078fcadff7509a87..dd9899c3e0dbadfc0074ffce87d51193e1c963cb 100644
|
|
--- a/gin/v8_initializer.h
|
|
+++ b/gin/v8_initializer.h
|
|
@@ -31,7 +31,8 @@ class GIN_EXPORT V8Initializer {
|
|
// This should be called by IsolateHolder::Initialize().
|
|
static void Initialize(IsolateHolder::ScriptMode mode,
|
|
const std::string js_command_line_flags = {},
|
|
- v8::OOMErrorCallback oom_error_callback = nullptr);
|
|
+ v8::OOMErrorCallback oom_error_callback = nullptr,
|
|
+ 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
|