mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-07 15:53:08 +01:00
macOS: Fix crash when showing a select popup with CefDoMessageLoopWork (issue #2495)
This commit is contained in:
parent
847fd4fd63
commit
b472a8d9ea
@ -402,5 +402,10 @@ patches = [
|
||||
# Fix redraw of OSR PDF viewer.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2507
|
||||
'name': 'browser_child_frame_2507',
|
||||
},
|
||||
{
|
||||
# macOS: Fix crash when showing a select popup with CefDoMessageLoopWork.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2495
|
||||
'name': 'message_pump_mac_2495',
|
||||
}
|
||||
]
|
||||
|
24
patch/patches/message_pump_mac_2495.patch
Normal file
24
patch/patches/message_pump_mac_2495.patch
Normal file
@ -0,0 +1,24 @@
|
||||
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
|
||||
@@ -761,7 +761,8 @@ explicit MessagePumpScopedAutoreleasePool(MessagePumpCFRunLoopBase* pump) :
|
||||
#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.
|
||||
@@ -770,7 +771,8 @@ explicit MessagePumpScopedAutoreleasePool(MessagePumpCFRunLoopBase* pump) :
|
||||
}
|
||||
|
||||
ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() {
|
||||
- DCHECK(g_app_pump);
|
||||
+ if (!g_app_pump)
|
||||
+ return;
|
||||
g_app_pump->SetModeMask(kNSApplicationModalSafeModeMask);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user