mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-16 12:10:41 +01:00
cefclient: win: Fix crash on close with --use-native (see #3239)
OnBeforeClose notification is delivered via TabModel destruction in TabStripModel::SendDetachWebContentsNotifications. We need to let that call stack unwind before triggering TabStripModel destruction via closure of the native host window.
This commit is contained in:
parent
48137b9538
commit
c7b30ee80f
@ -1074,9 +1074,10 @@ void RootWindowWin::OnBrowserWindowDestroyed() {
|
||||
|
||||
if (!window_destroyed_) {
|
||||
// The browser was destroyed first. This could be due to the use of
|
||||
// off-screen rendering or execution of JavaScript window.close().
|
||||
// Close the RootWindow.
|
||||
Close(true);
|
||||
// off-screen rendering or native (external) parent, or execution of
|
||||
// JavaScript window.close(). Close the RootWindow asyncronously to allow
|
||||
// the current call stack to unwind.
|
||||
MAIN_POST_CLOSURE(base::BindOnce(&RootWindowWin::Close, this, true));
|
||||
}
|
||||
|
||||
browser_destroyed_ = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user