electron/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
electron-roller[bot] 5953dca8be
chore: bump chromium to 138.0.7204.15 (37-x-y) (#46980)
* chore: bump chromium in DEPS to 138.0.7166.1

* chore: bump chromium in DEPS to 138.0.7166.2

* chore: bump chromium in DEPS to 138.0.7168.1

* chore: bump chromium in DEPS to 138.0.7169.2

* chore: bump chromium in DEPS to 138.0.7170.1

* chore: bump chromium in DEPS to 138.0.7172.1

* chore: bump chromium in DEPS to 138.0.7173.0

* chore: bump chromium in DEPS to 138.0.7175.0

* chore: bump chromium in DEPS to 138.0.7177.1

* chore: bump chromium in DEPS to 138.0.7178.2

* chore: bump chromium in DEPS to 138.0.7180.1

* chore: bump chromium in DEPS to 138.0.7181.0

* chore: bump chromium in DEPS to 138.0.7182.2

* chore: bump chromium in DEPS to 138.0.7184.0

* chore: bump chromium in DEPS to 138.0.7186.0

* chore: bump chromium in DEPS to 138.0.7188.0

* chore: bump chromium in DEPS to 138.0.7190.1

* chore: bump chromium in DEPS to 138.0.7192.0

* chore: bump chromium in DEPS to 138.0.7194.1

* chore: bump chromium in DEPS to 138.0.7196.1

* chore: bump chromium in DEPS to 138.0.7198.1

* chore: bump chromium in DEPS to 138.0.7200.0

* chore: bump chromium in DEPS to 138.0.7202.0

* chore: bump chromium in DEPS to 138.0.7204.0

* chore: bump chromium in DEPS to 138.0.7204.5

* chore: bump chromium in DEPS to 138.0.7204.4

* 6543986: Mac: decouple deserializing and applying sandbox policy

Refs 6543986

(cherry picked from commit d386063e9d2414a35c91c4fa017665d950de5882)

* 6566111: Change UtilityProcessHost to manage its instance internally
Refs 6566111

(cherry picked from commit 93a0a91d447c118de33efec079365f5d0e8363db)

* chore: update patches

* 6577970: Remove superfluous includes for base/strings/stringprintf.h in headers
Refs 6577970

(cherry picked from commit 9ba045f3715d85792e4aa12139e7e05e0b772634)

* 6568811: Add FunctionCall structured metrics event for DevTools
Refs 6568811

(cherry picked from commit 79ae6f2c8b53568b6277998cfe9a91e3a1ee595b)

* [PDF Ink Signatures] Support PdfAnnotationsEnabled policy

6558970

* Mac: Switch to Xcode 16.3 (16E140) and SDK 15.4 (24E241)

6431799

* chore: bump chromium in DEPS to 138.0.7204.15

* chore: update patches

* fixup Mac: decouple deserializing and applying sandbox policy

6543986

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-09 09:32:23 -04:00

49 lines
2.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Milan Burda <milan.burda@gmail.com>
Date: Thu, 11 Apr 2019 14:49:20 +0200
Subject: add_contentgpuclient_precreatemessageloop_callback.patch
This adds a ContentGpuClient::PreCreateMessageLoop() callback.
Invoke in GpuMain after SetErrorMode, before starting the message loop.
Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 5cf9e02f97e1378b0b1a55feb007b7d664fc4a84..d1fdf00a1b65fe0f5510608c165df93cf6c13e38 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -269,6 +269,10 @@ int GpuMain(MainFunctionParams parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuLogMessageManager::GetInstance()->InstallPreInitializeLogHandler();
+ auto* client = GetContentClient()->gpu();
+ if (client)
+ client->PreCreateMessageLoop();
+
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -378,7 +382,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;
- auto* client = GetContentClient()->gpu();
if (client) {
client->PostSandboxInitialized();
}
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
index c89b010e7ac78e2a7246ee54fe302cd6b9299710..46fd522fb2ac2793a3a073a4f833a4425dcee941 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -32,6 +32,10 @@ class CONTENT_EXPORT ContentGpuClient {
public:
virtual ~ContentGpuClient() {}
+ // Allows the embedder to perform platform-specific initialization before
+ // creating the message loop.
+ virtual void PreCreateMessageLoop() {}
+
// Called during initialization once the GpuService has been initialized.
virtual void GpuServiceInitialized() {}