Fix crash when ALT+Clicking invalid protocol link (issue #2306)

This commit is contained in:
Marshall Greenblatt
2017-12-22 16:05:32 -05:00
parent f052e282dd
commit 54a015f785
6 changed files with 326 additions and 104 deletions

View File

@@ -126,10 +126,11 @@ bool CefBrowserContextProxy::IsOffTheRecord() const {
content::DownloadManagerDelegate*
CefBrowserContextProxy::GetDownloadManagerDelegate() {
DCHECK(!download_manager_delegate_.get());
content::DownloadManager* manager = BrowserContext::GetDownloadManager(this);
download_manager_delegate_.reset(new CefDownloadManagerDelegate(manager));
if (!download_manager_delegate_) {
content::DownloadManager* manager =
BrowserContext::GetDownloadManager(this);
download_manager_delegate_.reset(new CefDownloadManagerDelegate(manager));
}
return download_manager_delegate_.get();
}