Commit 2726c1af authored by Maria Kazinova's avatar Maria Kazinova Committed by Commit Bot

Adding a driver check in PasswordGenerationPopupControllerImpl::

PasswordAccepted.

Having this check ensures there is no nullptr dereference in case the
driver is deleted and the browser process is not aware of it (i.e.
in case when the renderer is compromised).

Bug: 1133635
Change-Id: Ieee8c2200a4b323af39f730011e733b74e8bc911
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440095
Commit-Queue: Maria Kazinova <kazinova@google.com>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812695}
parent 11eba3d1
...@@ -194,6 +194,7 @@ void PasswordGenerationPopupControllerImpl::PasswordAccepted() { ...@@ -194,6 +194,7 @@ void PasswordGenerationPopupControllerImpl::PasswordAccepted() {
return; return;
base::WeakPtr<PasswordGenerationPopupControllerImpl> weak_this = GetWeakPtr(); base::WeakPtr<PasswordGenerationPopupControllerImpl> weak_this = GetWeakPtr();
CHECK(driver_);
driver_->GeneratedPasswordAccepted(form_data_, generation_element_id_, driver_->GeneratedPasswordAccepted(form_data_, generation_element_id_,
current_password_); current_password_);
// |this| can be destroyed here because GeneratedPasswordAccepted pops up // |this| can be destroyed here because GeneratedPasswordAccepted pops up
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment