diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 19:33:37 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 19:33:37 +0000 |
commit | 4f03d80e863f918a1da3981239a6d511dc79cbad (patch) | |
tree | 756df8fb45e37ec807357c87be008aa0727a09dc /chrome/browser | |
parent | d289d0bf93b5498e2ee10822073ceb67b4e45e5d (diff) | |
download | chromium_src-4f03d80e863f918a1da3981239a6d511dc79cbad.zip chromium_src-4f03d80e863f918a1da3981239a6d511dc79cbad.tar.gz chromium_src-4f03d80e863f918a1da3981239a6d511dc79cbad.tar.bz2 |
Don't DCHECK for resolving empty hostnames since PAC scripts can fire off such queries.
Instead, just ignore those queries.
BUG=47501
TEST=none
Committing patch on behalf of jochen.
Original code review: http://codereview.chromium.org/2850028/show
Review URL: http://codereview.chromium.org/2870028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/net/dns_global.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/net/dns_global.cc b/chrome/browser/net/dns_global.cc index 1fae92f..48bedfc 100644 --- a/chrome/browser/net/dns_global.cc +++ b/chrome/browser/net/dns_global.cc @@ -306,7 +306,8 @@ void PrefetchObserver::OnStartResolution( DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); if (request_info.is_speculative()) return; // One of our own requests. - DCHECK_NE(0U, request_info.hostname().length()); + if (!request_info.hostname().length()) + return; // PAC scripts may create queries without a hostname. UrlInfo navigation_info; // TODO(jar): Remove hack which guestimates ssl via port number, and perhaps @@ -331,6 +332,8 @@ void PrefetchObserver::OnFinishResolutionWithStatus( DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); if (request_info.is_speculative()) return; // One of our own requests. + if (!request_info.hostname().length()) + return; // PAC scripts may create queries without a hostname. UrlInfo navigation_info; size_t startup_count = 0; { @@ -370,6 +373,8 @@ void PrefetchObserver::OnCancelResolution( DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); if (request_info.is_speculative()) return; // One of our own requests. + if (!request_info.hostname().length()) + return; // PAC scripts may create queries without a hostname. // Remove the entry from |resolutions| that was added by OnStartResolution(). ObservedResolutionMap::iterator it = resolutions_.find(request_id); |