Fix an assertion when exiting the browser after a popup window has been canceled (issue #830).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@975 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
afe3cb1d67
commit
10ed5d699f
|
@ -319,8 +319,15 @@ void CefContentBrowserClient::DestroyAllBrowsers() {
|
|||
BrowserInfoList::iterator it = list.begin();
|
||||
for (; it != list.end(); ++it) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser = (*it)->browser();
|
||||
if (browser.get())
|
||||
if (browser.get()) {
|
||||
// DestroyBrowser will call RemoveBrowserInfo.
|
||||
browser->DestroyBrowser();
|
||||
} else {
|
||||
// Canceled popup windows may have browser info but no browser because
|
||||
// CefBrowserMessageFilter::OnGetNewBrowserInfo is still called.
|
||||
DCHECK((*it)->is_popup());
|
||||
RemoveBrowserInfo(*it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue