Index: components/autofill/content/renderer/password_autofill_agent.cc |
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc |
index 8797971ab7c53c8074243fe9905c11454d2fca5d..17ef3d72d851535cab3acd9dabf6e2e8546d1d15 100644 |
--- a/components/autofill/content/renderer/password_autofill_agent.cc |
+++ b/components/autofill/content/renderer/password_autofill_agent.cc |
@@ -1217,7 +1217,14 @@ void PasswordAutofillAgent::ProvisionallySavePassword( |
blink::WebLocalFrame* frame, |
const blink::WebFormElement& form, |
ProvisionallySaveRestriction restriction) { |
- DCHECK(frame); |
+ // TODO(vabr): This is just to stop getting a NULL frame in |
+ // |provisionally_saved_forms_|. Cases where we try to save password for a |
+ // form in a NULL frame should not happen, and it's currently unclear how they |
+ // happen (http://crbug.com/420519). This thing will be hopefully solved by |
+ // migrating the PasswordAutofillAgent to observe frames directly |
+ // (http://crbug.com/400186). |
+ if (!frame) |
+ return; |
scoped_ptr<PasswordForm> password_form(CreatePasswordForm(form)); |
if (!password_form || (restriction == RESTRICTION_NON_EMPTY_PASSWORD && |
password_form->password_value.empty() && |