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

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

Issue 649583003: PasswordAutofillAgent: do not provisionally save forms in NULL frames (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 ae858fec29733ff3ca893828ba6173d7753ba4a0..0c158ccafd99327653ea0def1f0cde3cc1b4fd02 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -533,8 +533,11 @@ bool PasswordAutofillAgent::TextDidChangeInTextField(
// handlers run, so save away a copy of the password in case it gets lost.
// To honor the user having explicitly cleared the password, even an empty
// password will be saved here.
- ProvisionallySavePassword(
- element.document().frame(), element.form(), RESTRICTION_NONE);
+ blink::WebLocalFrame* element_frame = element.document().frame();
+ if (element_frame) {
Mike West 2014/10/13 13:13:00 You can put the whole assignment into the 'if'.
vabr (Chromium) 2014/10/13 13:53:17 Done.
+ ProvisionallySavePassword(
+ element_frame, element.form(), RESTRICTION_NONE);
+ }
PasswordToLoginMap::iterator iter = password_to_username_.find(element);
Mike West 2014/10/13 13:13:00 Do we need to do the rest of this if we're not in
vabr (Chromium) 2014/10/13 13:53:17 The second part is there for cases, where the user
if (iter != password_to_username_.end()) {
« 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