2018-09-28 16:27:09 +02:00
|
|
|
diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm
|
|
|
|
index fb2520179995..165a8d4b4b29 100644
|
|
|
|
--- base/message_loop/message_pump_mac.mm
|
|
|
|
+++ base/message_loop/message_pump_mac.mm
|
2018-10-02 14:14:11 +02:00
|
|
|
@@ -761,7 +761,8 @@ void MessagePumpUIApplication::Attach(Delegate* delegate) {
|
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.
|
2018-10-02 14:14:11 +02: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);
|
|
|
|
}
|
|
|
|
|