summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 17:17:10 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 17:17:10 +0000
commitdd92c8dc5191650d37501f74bf017e4ad4f664a4 (patch)
tree751af9a7474750541fb827ed7e1a7af4d83ba9fb /chrome/browser/renderer_host
parenta58766d7dd57483d6457c2bb8719fe1b3bb0706d (diff)
downloadchromium_src-dd92c8dc5191650d37501f74bf017e4ad4f664a4.zip
chromium_src-dd92c8dc5191650d37501f74bf017e4ad4f664a4.tar.gz
chromium_src-dd92c8dc5191650d37501f74bf017e4ad4f664a4.tar.bz2
Fix crash bug when attempting to download a url with unsupported scheme,
e.g. 'data:', by 'Alt + Click'. Note: This change only fixes crash. Supporting a download for URL with 'data:' scheme is not implemented in the change. BUG=24846 TEST=See the first entry of bug 24846 and confirm that the browser won't crash. Original patch by hayato@google.com at http://codereview.chromium.org/287002/show Review URL: http://codereview.chromium.org/306007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 3e01326..3ce96d1 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -730,9 +730,10 @@ void ResourceDispatcherHost::BeginDownload(const GURL& url,
receiver_);
}
- bool known_proto = URLRequest::IsHandledURL(url);
- if (!known_proto) {
- CHECK(false);
+ if (!URLRequest::IsHandledURL(url)) {
+ LOG(INFO) << "Download request for unsupported protocol: " <<
+ url.possibly_invalid_spec();
+ return;
}
request->set_method("GET");