Free CefMenuRunnerViews on BrowserView destruction (see #3790)

CefMenuRunnerViews holds a raw_ptr<CefBrowserViewImpl> that must be
cleared during CefBrowserViewImpl destruction.
This commit is contained in:
Marshall Greenblatt 2024-11-04 17:08:58 -05:00
parent 41fbe6f0c2
commit 47d60f3a60
1 changed files with 6 additions and 1 deletions

View File

@ -551,6 +551,10 @@ void AlloyBrowserHostImpl::WindowDestroyed() {
CEF_REQUIRE_UIT();
DCHECK(!window_destroyed_);
window_destroyed_ = true;
// Destroy objects that may reference the window.
menu_manager_.reset(nullptr);
CloseBrowser(true);
}
@ -929,9 +933,10 @@ void AlloyBrowserHostImpl::PrintCrossProcessSubframe(
int document_cookie,
content::RenderFrameHost* subframe_host) const {
auto* client = printing::PrintCompositeClient::FromWebContents(web_contents);
if (client)
if (client) {
client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
}
}
content::WebContents* AlloyBrowserHostImpl::OpenURLFromTab(
content::WebContents* source,