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

Unified Diff: chrome/browser/password_manager/password_store_default.cc

Issue 2035003: Fix a possible crash introduced by r46412 by not accessing the result variabl... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 7 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: chrome/browser/password_manager/password_store_default.cc
===================================================================
--- chrome/browser/password_manager/password_store_default.cc (revision 46560)
+++ chrome/browser/password_manager/password_store_default.cc (working copy)
@@ -116,17 +116,16 @@
WebDataService::Handle handle,
const WDTypedResult* result) {
DCHECK(handles_.end() != handles_.find(handle));
- DCHECK(result);
+ handles_.erase(handle);
+ if (!result)
+ return;
+
if (PASSWORD_RESULT != result->GetType()) {
NOTREACHED();
return;
}
- handles_.erase(handle);
- if (!result)
- return;
-
const PasswordForms& forms =
static_cast<const WDResult<PasswordForms>*>(result)->GetValue();
for (PasswordForms::const_iterator it = forms.begin();
« 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