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

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

Issue 432863003: Add a DCHECK for NULL frame pointers in PasswordAutofillAgent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 d23bbf1242dfed1c24e2b018cfc50db8a070bba8..b5ac6439b9ca1978199292fe0cf524585715d1d9 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -672,6 +672,7 @@ blink::WebFrame* PasswordAutofillAgent::CurrentOrChildFrameWithSavedForms(
it != provisionally_saved_forms_.end();
++it) {
blink::WebFrame* form_frame = it->first;
+ DCHECK(form_frame);
Ilya Sherman 2014/08/01 18:42:39 This is dereferenced on line 683 below, so I'm not
vabr (Chromium) 2014/08/01 19:10:13 Fair point, I removed it.
// The check that the returned frame is related to |current_frame| is mainly
// for double-checking. There should not be any unrelated frames in
// |provisionally_saved_forms_|, because the map is cleared after
@@ -1109,6 +1110,7 @@ void PasswordAutofillAgent::ProvisionallySavePassword(
blink::WebLocalFrame* frame,
const blink::WebFormElement& form,
ProvisionallySaveRestriction restriction) {
+ DCHECK(frame);
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