Browse Source

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

Co-authored-by: Jeremy Rose <[email protected]>
trop[bot] 4 years ago
parent
commit
5b617a7f39
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

@@ -823,8 +823,7 @@ void WebContents::AddNewContents(
            initial_rect.x(), initial_rect.y(), initial_rect.width(),
            initial_rect.height(), tracker->url, tracker->frame_name,
            tracker->referrer, tracker->raw_features, tracker->body)) {
-    // TODO(zcbenz): Can we make this sync?
-    api_web_contents->DestroyWebContents(true /* async */);
+    api_web_contents->DestroyWebContents(false /* async */);
   }
 }