Commit 238ee77b authored by Maria Kazinova's avatar Maria Kazinova Committed by Commit Bot

Handle not being able to access PM gracefully in PasswordAutofillAgent.

Replacing a DCHECK in PasswordAutofillAgent::InformAboutFormClearing()
with a condition check and return, since this condition might be
true and the method should not proceed, but it shouldn't cause a crash.

Bug: 1151915
Change-Id: Ib23746cb1e063f8539a5812fcd8105b799e636b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2553553Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Maria Kazinova <kazinova@google.com>
Cr-Commit-Position: refs/heads/master@{#830202}
parent df793ea2
......@@ -1375,8 +1375,8 @@ PasswordAutofillAgent::GetFormDataFromUnownedInputElements() {
void PasswordAutofillAgent::InformAboutFormClearing(
const WebFormElement& form) {
DCHECK(FrameCanAccessPasswordManager());
if (!base::FeatureList::IsEnabled(
if (!FrameCanAccessPasswordManager() ||
!base::FeatureList::IsEnabled(
password_manager::features::kDetectFormSubmissionOnFormClear)) {
return;
}
......
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