diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 20:44:00 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 20:44:00 +0000 |
commit | 84703291a8b3ef507401a4e270597e987f33bb54 (patch) | |
tree | b5ae2a38e693cfd9982ca7f7807f1da2999d34a3 | |
parent | fc7390b5fd9d99fe33d9bd596db0a2a4cb00b0c9 (diff) | |
download | chromium_src-84703291a8b3ef507401a4e270597e987f33bb54.zip chromium_src-84703291a8b3ef507401a4e270597e987f33bb54.tar.gz chromium_src-84703291a8b3ef507401a4e270597e987f33bb54.tar.bz2 |
Don't call DidLoadResourceFromMemoryCache() on data: URLs.
These can cause crashes in IPC on large data URLs. Chrome has no use for the long data: URLs, so there's no reason to send them.
BUG=95747
TEST=See bug.
Review URL: http://codereview.chromium.org/8341076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107789 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/renderer/render_view_impl.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 930b4c1..e63843e 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -2753,11 +2753,19 @@ void RenderViewImpl::didFailResourceLoad( void RenderViewImpl::didLoadResourceFromMemoryCache( WebFrame* frame, const WebURLRequest& request, const WebURLResponse& response) { + // The recipients of this message have no use for data: URLs: they don't + // affect the page's insecure content list and are not in the disk cache. To + // prevent large (1M+) data: URLs from crashing in the IPC system, we simply + // filter them out here. + GURL url(request.url()); + if (url.SchemeIs("data")) + return; + // Let the browser know we loaded a resource from the memory cache. This // message is needed to display the correct SSL indicators. Send(new ViewHostMsg_DidLoadResourceFromMemoryCache( routing_id_, - request.url(), + url, response.securityInfo(), request.httpMethod().utf8(), ResourceType::FromTargetType(request.targetType()))); |