Title: [87485] trunk/Source/WebCore
- Revision
- 87485
- Author
- commit-qu...@webkit.org
- Date
- 2011-05-27 01:26:49 -0700 (Fri, 27 May 2011)
Log Message
2011-05-27 James Robinson <jam...@chromium.org>
Reviewed by Adam Barth.
CachedResourceLoader stores data: urls in validated URL set
https://bugs.webkit.org/show_bug.cgi?id=61604
CachedResourceLoader maintains a set of URLs that have been validated to avoid validating the same resource
multiple times for loads within the same document. This doesn't make sense for data: URLs and just wastes
memory.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (87484 => 87485)
--- trunk/Source/WebCore/ChangeLog 2011-05-27 08:01:49 UTC (rev 87484)
+++ trunk/Source/WebCore/ChangeLog 2011-05-27 08:26:49 UTC (rev 87485)
@@ -1,3 +1,18 @@
+2011-05-27 James Robinson <jam...@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ CachedResourceLoader stores data: urls in validated URL set
+ https://bugs.webkit.org/show_bug.cgi?id=61604
+
+ CachedResourceLoader maintains a set of URLs that have been validated to avoid validating the same resource
+ multiple times for loads within the same document. This doesn't make sense for data: URLs and just wastes
+ memory.
+
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::revalidateResource):
+ (WebCore::CachedResourceLoader::loadResource):
+
2011-05-23 MORITA Hajime <morr...@google.com>
Reviewed by Tony Chang.
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (87484 => 87485)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2011-05-27 08:01:49 UTC (rev 87484)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2011-05-27 08:26:49 UTC (rev 87485)
@@ -376,6 +376,7 @@
// Copy the URL out of the resource to be revalidated in case it gets deleted by the remove() call below.
String url = ""
+ bool urlProtocolIsData = resource->url().protocolIsData();
CachedResource* newResource = createResource(resource->type(), resource->resourceRequest(), resource->encoding());
LOG(ResourceLoading, "Resource %p created to revalidate %p", newResource, resource);
@@ -386,8 +387,9 @@
newResource->setLoadPriority(priority);
newResource->load(this);
-
- m_validatedURLs.add(url);
+
+ if (!urlProtocolIsData)
+ m_validatedURLs.add(url);
return newResource;
}
@@ -423,7 +425,8 @@
return 0;
}
- m_validatedURLs.add(request.url());
+ if (!request.url().protocolIsData())
+ m_validatedURLs.add(request.url());
return resource;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes