cef/patch/patches/message_pump_mac_2495.patch

25 lines
957 B
Diff
Raw Normal View History

diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm
index 6ebddfc9f404..85809cf7b134 100644
--- base/message_loop/message_pump_mac.mm
+++ base/message_loop/message_pump_mac.mm
@@ -799,7 +799,8 @@ void MessagePumpUIApplication::Attach(Delegate* delegate) {
#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.
@@ -811,7 +812,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
}
ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() {
- DCHECK(g_app_pump);
+ if (!g_app_pump)
+ return;
g_app_pump->SetModeMask(kNSApplicationModalSafeModeMask);
g_app_pump->SetTimerInvalidationAllowed(true);
}