mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix crash when closing an OSR browser (fixes issue #2919)
Release the Compositor before the WebContents is destroyed to match the behavior in non-OSR code.
This commit is contained in:
committed by
Marshall Greenblatt
parent
82d6bcbbea
commit
574d4dcedc
@@ -71,6 +71,20 @@ void CefBrowserPlatformDelegateOsr::BrowserCreated(
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateOsr::NotifyBrowserDestroyed() {
|
||||
content::WebContents* web_contents = browser_->web_contents();
|
||||
content::RenderViewHost* host = web_contents->GetRenderViewHost();
|
||||
if (host) {
|
||||
CefRenderWidgetHostViewOSR* view =
|
||||
static_cast<CefRenderWidgetHostViewOSR*>(host->GetWidget()->GetView());
|
||||
if (view) {
|
||||
view->ReleaseCompositor();
|
||||
}
|
||||
}
|
||||
|
||||
CefBrowserPlatformDelegateAlloy::NotifyBrowserDestroyed();
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateOsr::BrowserDestroyed(
|
||||
CefBrowserHostImpl* browser) {
|
||||
CefBrowserPlatformDelegateAlloy::BrowserDestroyed(browser);
|
||||
|
Reference in New Issue
Block a user