electron/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
electron-roller[bot] 55d8b71d72
chore: bump chromium to 141.0.7346.0 (main) (#47983)
* chore: bump chromium in DEPS to 141.0.7341.0

* chore: bump chromium in DEPS to 141.0.7342.0

* chore: update patches

manually resolved conflict in `osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch` due to https://crrev.com/c/6681354

* 6819541: WebShare: Improve mac share behavior when sharing a URL
https://chromium-review.googlesource.com/c/chromium/src/+/6819541

* Add missing include for SkBitmap

Couldn't quickly find where we lost the full definition in this file's includes. 🤷

* 6771055: [SxS] Move devtools to ContentsContainerView supporting side-by-side.
https://chromium-review.googlesource.com/c/chromium/src/+/6771055

There may be some simplification possible here (set_x, Rect position, ...), but this change is satisfactory to maintain the current behavior.

* 6813689: Switch SystemMemoryInfoKB to use ByteCount
https://chromium-review.googlesource.com/c/chromium/src/+/6813689

* 6818486: Track DevTools feature usage in new badge tracker
https://chromium-review.googlesource.com/c/chromium/src/+/6818486

* chore: bump chromium in DEPS to 141.0.7344.0

* Remove ELECTRON_OZONE_PLATFORM_HINT env var

6819616: Remove OzonePlatformHint | https://chromium-review.googlesource.com/c/chromium/src/+/6819616

See: https://github.com/electron/electron/issues/48001

* chore: update patches

* Add missing include for `base::NumberToString`

* Remove `DESKTOP_STARTUP_ID` code

This was removed upstream in https://chromium-review.googlesource.com/c/chromium/src/+/6819616 and I confirmed with the author that it was an intentional change. Going to mirror upstream and remove it here too.

* chore: bump chromium in DEPS to 141.0.7346.0

* chore: update patches

* 6828465: Reland "Remove BluezDBusThreadManager"
https://chromium-review.googlesource.com/c/chromium/src/+/6828465

* Patch change to Node.js test output

V8 enhanced the stack trace of "thenable" async tasks. A couple of Node.js tests needed to have their snapshots updates to accomodate the extra stack trace frames in the output.

This patch should be upstreamed to Node.js.

See:
6826001: fix thenable async stack trace
https://chromium-review.googlesource.com/c/v8/v8/+/6826001

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-08-11 12:57:31 +09: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 6f8e8dd8e7ddb9e3d4c142493f249f616520d613..f89b2e5b846b3b96c99dea2a3b49bc9823ab51e5 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -271,6 +271,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
@@ -380,7 +384,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 e5389b44df98ab1a5c976524a66a26c763e5c436..4a183b4959fae18e6875440e6570b8ada6823d81 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -36,6 +36,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() {}