Skip to content

Commit

Permalink
chore: synchronously destroy WebContents on event prevented (#26442)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaurencin committed Nov 11, 2020
1 parent 16b8c06 commit 24fbb73
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions shell/browser/api/electron_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 */);
}
}

Expand Down

0 comments on commit 24fbb73

Please sign in to comment.