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

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: element_frame now local to the if statement 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..8797971ab7c53c8074243fe9905c11454d2fca5d 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -533,8 +533,10 @@ 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);
+ if (blink::WebLocalFrame* element_frame = element.document().frame()) {
+ ProvisionallySavePassword(
+ element_frame, element.form(), RESTRICTION_NONE);
+ }
PasswordToLoginMap::iterator iter = password_to_username_.find(element);
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