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()) { |