2018-09-28 16:27:09 +02:00
|
|
|
diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm
|
2020-02-10 18:10:17 +01:00
|
|
|
index 7711944f8e30..676f69e7890a 100644
|
2018-09-28 16:27:09 +02:00
|
|
|
--- base/message_loop/message_pump_mac.mm
|
|
|
|
+++ base/message_loop/message_pump_mac.mm
|
2020-02-10 18:10:17 +01:00
|
|
|
@@ -777,7 +777,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.
|
2020-02-10 18:10:17 +01:00
|
|
|
@@ -789,7 +790,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);
|
2019-01-17 10:56:52 +01:00
|
|
|
g_app_pump->SetTimerInvalidationAllowed(true);
|
2018-09-28 16:27:09 +02:00
|
|
|
}
|