12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
- From: Milan Burda <[email protected]>
- 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 1a2c3b6a910c24b7d124ea1b3180a3c9655580d8..e6795df82114e85cbda78ca89ca0716f963ba180 100644
- --- a/content/gpu/gpu_main.cc
- +++ b/content/gpu/gpu_main.cc
- @@ -255,6 +255,10 @@ int GpuMain(const 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
- @@ -389,7 +393,6 @@ int GpuMain(const MainFunctionParams& parameters) {
- }
- #endif
-
- - auto* client = GetContentClient()->gpu();
- if (client)
- client->PostIOThreadCreated(gpu_process.io_task_runner());
-
- diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
- index 88e80bdaecbdd9000109f638c6d79d8102d0e537..a0c0f17e6642dcd2690c095b95ff2c2de9b6ae4f 100644
- --- a/content/public/gpu/content_gpu_client.h
- +++ b/content/public/gpu/content_gpu_client.h
- @@ -30,6 +30,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() {}
-
|