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.

(cherry picked from commit fd7196a)

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-Original-Commit-Position: refs/heads/master@{#694682}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796242
Cr-Commit-Position: refs/branch-heads/3904@{chromium#43}
Cr-Branched-From: 675968a-refs/heads/master@{#693954}
  • Loading branch information
rknoll authored and Alex Chau committed Sep 10, 2019
1 parent 6d5321a commit def1ab2
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 def1ab2

Please sign in to comment.