From c68f41b8d837f21e8cf2a5d9c09b2a475a0230ef Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 19 Apr 2017 21:54:04 +0530 Subject: [PATCH] destroy new window webContents asynchronously --- atom/browser/api/atom_api_web_contents.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 4dd3d51fe0a2..a06ec2244dde 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -490,7 +490,7 @@ void WebContents::AddNewContents(content::WebContents* source, if (Emit("-add-new-contents", api_web_contents, disposition, user_gesture, initial_rect.x(), initial_rect.y(), initial_rect.width(), initial_rect.height())) { - api_web_contents->DestroyWebContents(false /* async */); + api_web_contents->DestroyWebContents(true /* async */); } }