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

Unified Diff: content/renderer/render_view_impl.cc

Issue 8341076: Don't call DidLoadResourceFromMemoryCache() on data: URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove braces Created 9 years, 2 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: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index c4d1fed43c0b6e7735893f698168704399cd6f7c..10e2831fb3c4691c50c43bd4631be13b03c5306e 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2762,11 +2762,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())));
« 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