Commit 0c25f1ec authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Commit Bot

[Passwords] Handle null driver in generation popup gracefully

This change gracefully handles a null PasswordManagerDriver in
PasswordGenerationPopupControllerImpl::PasswordAccepted instead of
forcing a CHECK failure.

Bug: 1133635
Change-Id: Ife83a3c8c78b5dff18c3252c3beb0092750d4420
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463834
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816536}
parent fe54f1ff
......@@ -194,9 +194,12 @@ void PasswordGenerationPopupControllerImpl::PasswordAccepted() {
return;
base::WeakPtr<PasswordGenerationPopupControllerImpl> weak_this = GetWeakPtr();
CHECK(driver_);
driver_->GeneratedPasswordAccepted(form_data_, generation_element_id_,
current_password_);
if (driver_) {
// See https://crbug.com/1133635 for when `driver_` might be null due to a
// compromised renderer.
driver_->GeneratedPasswordAccepted(form_data_, generation_element_id_,
current_password_);
}
// |this| can be destroyed here because GeneratedPasswordAccepted pops up
// another UI and generates some event to close the dropdown.
if (weak_this)
......
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