session: dont attach download dialog to deleted webContents window
This commit is contained in:
parent
0fa92923da
commit
46208b5b3e
2 changed files with 4 additions and 2 deletions
|
@ -315,7 +315,7 @@ void Session::OnDownloadCreated(content::DownloadManager* manager,
|
|||
bool prevent_default = Emit(
|
||||
"will-download",
|
||||
DownloadItem::Create(isolate(), item),
|
||||
api::WebContents::CreateFrom(isolate(), web_contents));
|
||||
web_contents);
|
||||
if (prevent_default) {
|
||||
item->Cancel(true);
|
||||
item->Remove();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue