fix crash when default download is canceled

This commit is contained in:
Robo 2016-02-02 00:26:37 +05:30
parent a575192c5f
commit 045e42a10c

View file

@ -296,10 +296,8 @@ void Session::OnDownloadCreated(content::DownloadManager* manager,
"will-download", "will-download",
DownloadItem::Create(isolate(), item), DownloadItem::Create(isolate(), item),
api::WebContents::CreateFrom(isolate(), web_contents)); api::WebContents::CreateFrom(isolate(), web_contents));
if (prevent_default) { if (prevent_default)
item->Cancel(true); item->Cancel(true);
item->Remove();
}
} }
void Session::ResolveProxy(const GURL& url, ResolveProxyCallback callback) { void Session::ResolveProxy(const GURL& url, ResolveProxyCallback callback) {