Skip to content

Commit

Permalink
Hotfix UAF when closing tab with sharing dialog.
Browse files Browse the repository at this point in the history
This fixes a UAF when closing a tab while there is a
SharingDialog open.

Bug: 1000934
Change-Id: Ie8f6e52626ee834bc72acfe318c5a28aafe27635
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1789150
Commit-Queue: Alex Chau <alexchau@chromium.org>
Reviewed-by: Alex Chau <alexchau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694682}
  • Loading branch information
rknoll authored and Commit Bot committed Sep 9, 2019
1 parent b2b10c5 commit fd7196a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chrome/browser/ui/views/sharing/sharing_dialog_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ base::string16 SharingDialogView::GetWindowTitle() const {
}

void SharingDialogView::WindowClosing() {
controller_->OnDialogClosed(this);
if (web_contents())
controller_->OnDialogClosed(this);
}

// static
Expand Down

0 comments on commit fd7196a

Please sign in to comment.