Browse Source

chore: synchronously destroy WebContents on event prevented (#26442)

Michaela Laurencin 4 years ago
parent
commit
24fbb73838
1 changed files with 1 additions and 2 deletions
  1. 1 2
      shell/browser/api/electron_api_web_contents.cc

+ 1 - 2
shell/browser/api/electron_api_web_contents.cc

@@ -792,8 +792,7 @@ void WebContents::AddNewContents(
   if (Emit("-add-new-contents", api_web_contents, disposition, user_gesture,
            initial_rect.x(), initial_rect.y(), initial_rect.width(),
            initial_rect.height(), tracker->url, tracker->frame_name)) {
-    // TODO(zcbenz): Can we make this sync?
-    api_web_contents->DestroyWebContents(true /* async */);
+    api_web_contents->DestroyWebContents(false /* async */);
   }
 }