electron/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
trop[bot] e7eb572c21
chore: bump chromium to 132.0.6826.0 (34-x-y) (#44603)
* chore: bump chromium in DEPS to 132.0.6821.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 132.0.6822.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: bump chromium in DEPS to 132.0.6824.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5998172: Migrate remaining NOTREACHED()s in chrome/ | https://chromium-review.googlesource.com/c/chromium/src/+/5998172

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5872484: Pass along accelerators for menu items coming from DevTools | https://chromium-review.googlesource.com/c/chromium/src/+/5872484

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5872913: Enable `raw_span` clang plugin [1/2] | https://chromium-review.googlesource.com/c/chromium/src/+/5872913

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fixup! picture-in-picture import

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5912245: [video pip] Add progress bar to 2024 UI | https://chromium-review.googlesource.com/c/chromium/src/+/5912245

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fixup! 5872913: Enable raw_span clang plugin [1/2] | https://chromium-review.googlesource.com/c/chromium/src/+/5872913

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2024-11-09 08:08:26 -06:00

49 lines
2 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 59ab3b746782c71f7d9401c13a7c866e6e7a823d..f95842da98d3a1d853633b53c745be9c394b25d5 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -258,6 +258,10 @@ int GpuMain(MainFunctionParams parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuServiceImpl::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
@@ -368,7 +372,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 351b97676ea1b928bedbb8a211d175684a166742..c54c452ef7a248982fa58dcd3b6b6f37bee4d13c 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -31,6 +31,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() {}