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:
Marshall Greenblatt 2013-01-04 12:36:39 +00:00
parent afe3cb1d67
commit 10ed5d699f
1 changed files with 8 additions and 1 deletions

View File

@ -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);
}
}
}