summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_download.cc
diff options
context:
space:
mode:
authorgeorgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 04:52:02 +0000
committergeorgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 04:52:02 +0000
commit658aa0c9ef38c707b301a01fd05edb9e3532372a (patch)
treee5746e5bfe3fdea8fdc9346fc515306fc1a8eabe /chrome/browser/autofill/autofill_download.cc
parent4cc1456c512a9862fa495ee147746f2583ba19e6 (diff)
downloadchromium_src-658aa0c9ef38c707b301a01fd05edb9e3532372a.zip
chromium_src-658aa0c9ef38c707b301a01fd05edb9e3532372a.tar.gz
chromium_src-658aa0c9ef38c707b301a01fd05edb9e3532372a.tar.bz2
Possible fix for 40234 + changed one of the DCHECK to CHECK
BUG=40234 TEST=Should not crash Review URL: http://codereview.chromium.org/1594019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_download.cc')
-rw-r--r--chrome/browser/autofill/autofill_download.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc
index 42d4a32..8316597 100644
--- a/chrome/browser/autofill/autofill_download.cc
+++ b/chrome/browser/autofill/autofill_download.cc
@@ -191,7 +191,11 @@ void AutoFillDownloadManager::OnURLFetchComplete(const URLFetcher* source,
const std::string& data) {
std::map<URLFetcher *, FormRequestData>::iterator it =
url_fetchers_.find(const_cast<URLFetcher*>(source));
- DCHECK(it != url_fetchers_.end());
+ if (it == url_fetchers_.end()) {
+ // Looks like crash on Mac is possibly caused with callback entering here
+ // with unknown fetcher when network is refreshed.
+ return;
+ }
std::string type_of_request(
it->second.request_type == AutoFillDownloadManager::REQUEST_QUERY ?
"query" : "upload");
@@ -200,7 +204,7 @@ void AutoFillDownloadManager::OnURLFetchComplete(const URLFetcher* source,
const int kHttpBadGateway = 502;
const int kHttpServiceUnavailable = 503;
- DCHECK(it->second.form_signatures.size());
+ CHECK(it->second.form_signatures.size());
if (response_code != kHttpResponseOk) {
bool back_off = false;
std::string server_header;