From 77b4a1f3692e96b5a458d97cbb14739c4b0b2815 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 27 Dec 2021 10:26:46 +0100 Subject: Do not overwrite signal handlers in the browser process. This adds a boolean to ContentMainParams that we can set to false in the WebEngineContext in order to not overwrite the signal handlers that may be set by the application using QtWebEngine. Task-number: QTBUG-42747 Task-number: QTBUG-99263 Change-Id: If9b7a66019594245545edf891fec4e5cf62dcf4a Reviewed-by: Kirill Burtsev (cherry picked from commit 48a205f9e054b5cc3e67df2e25382da9460c0015) Reviewed-by: Qt Cherry-pick Bot --- chromium/content/app/content_main.cc | 3 ++- chromium/content/public/app/content_main.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/chromium/content/app/content_main.cc b/chromium/content/app/content_main.cc index 49c0e3a8c31..544d4061bb9 100644 --- a/chromium/content/app/content_main.cc +++ b/chromium/content/app/content_main.cc @@ -346,7 +346,8 @@ RunContentProcess(ContentMainParams params, // default, "C", locale. setlocale(LC_NUMERIC, "C"); - SetupSignalHandlers(); + if (params.setup_signal_handlers) + SetupSignalHandlers(); #endif #if BUILDFLAG(IS_WIN) diff --git a/chromium/content/public/app/content_main.h b/chromium/content/public/app/content_main.h index 268b201ab06..c68954bfe7e 100644 --- a/chromium/content/public/app/content_main.h +++ b/chromium/content/public/app/content_main.h @@ -66,6 +66,8 @@ struct CONTENT_EXPORT ContentMainParams { // are left uninitialized. bool minimal_browser_mode = false; + bool setup_signal_handlers = true; + #if BUILDFLAG(IS_MAC) // The outermost autorelease pool to pass to main entry points. base::mac::ScopedNSAutoreleasePool* autorelease_pool = nullptr; -- cgit v1.2.1