Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: components/autofill/content/renderer/password_autofill_agent.cc

Issue 666503002: PasswordAutofillAgent: avoid NULL frames in provisionally_saved_forms_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698