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

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: Add comment 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..65367cf0ff0604d0db33974c13bd936854bea542 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) {
+ GURL url(request.url());
+ // 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.
+ if (url.SchemeIs("data")) {
+ return;
+ }
piman 2011/10/27 21:11:44 We usually skip braces if we only have one stateme
// 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