2023-09-15 21:51:43 +02:00
|
|
|
diff --git base/message_loop/message_pump_apple.mm base/message_loop/message_pump_apple.mm
|
2024-03-19 22:11:42 +01:00
|
|
|
index 5e9d5f082e2c4..6cc3a5981d55c 100644
|
2023-09-15 21:51:43 +02:00
|
|
|
--- base/message_loop/message_pump_apple.mm
|
|
|
|
+++ base/message_loop/message_pump_apple.mm
|
2023-11-21 20:17:55 +01:00
|
|
|
@@ -759,7 +759,8 @@ void MessagePumpUIApplication::Detach() {
|
2018-09-28 16:27:09 +02:00
|
|
|
#else
|
|
|
|
|
|
|
|
ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
|
|
|
|
- DCHECK(g_app_pump);
|
|
|
|
+ if (!g_app_pump)
|
|
|
|
+ return;
|
|
|
|
DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask());
|
|
|
|
// Pumping events in private runloop modes is known to interact badly with
|
|
|
|
// app modal windows like NSAlert.
|
2023-11-21 20:17:55 +01:00
|
|
|
@@ -770,7 +771,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
|
2018-09-28 16:27:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() {
|
|
|
|
- DCHECK(g_app_pump);
|
|
|
|
+ if (!g_app_pump)
|
|
|
|
+ return;
|
|
|
|
g_app_pump->SetModeMask(kNSApplicationModalSafeModeMask);
|
|
|
|
}
|
2020-07-08 19:23:29 +02:00
|
|
|
|