Title: [89303] trunk/Source/WebCore
- Revision
- 89303
- Author
- [email protected]
- Date
- 2011-06-20 16:11:52 -0700 (Mon, 20 Jun 2011)
Log Message
2011-06-20 Anders Carlsson <[email protected]>
Reviewed by Sam Weinig.
Web archive resource loads are scheduled together with network loads
https://bugs.webkit.org/show_bug.cgi?id=63024
<rdar://problem/9508564>
If the resource being loaded is loaded from a web archive we don't need to schedule the load
since it won't touch the network.
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (89302 => 89303)
--- trunk/Source/WebCore/ChangeLog 2011-06-20 23:05:40 UTC (rev 89302)
+++ trunk/Source/WebCore/ChangeLog 2011-06-20 23:11:52 UTC (rev 89303)
@@ -1,3 +1,17 @@
+2011-06-20 Anders Carlsson <[email protected]>
+
+ Reviewed by Sam Weinig.
+
+ Web archive resource loads are scheduled together with network loads
+ https://bugs.webkit.org/show_bug.cgi?id=63024
+ <rdar://problem/9508564>
+
+ If the resource being loaded is loaded from a web archive we don't need to schedule the load
+ since it won't touch the network.
+
+ * loader/ResourceLoadScheduler.cpp:
+ (WebCore::ResourceLoadScheduler::scheduleLoad):
+
2011-06-20 Pratik Solanki <[email protected]>
Reviewed by David Kilzer.
Modified: trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp (89302 => 89303)
--- trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp 2011-06-20 23:05:40 UTC (rev 89302)
+++ trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp 2011-06-20 23:11:52 UTC (rev 89303)
@@ -26,6 +26,7 @@
#include "ResourceLoadScheduler.h"
#include "Document.h"
+#include "DocumentLoader.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "InspectorInstrumentation.h"
@@ -114,6 +115,13 @@
#endif
LOG(ResourceLoading, "ResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data());
+
+ // If there's a web archive resource for this URL, we don't need to schedule the load since it will never touch the network.
+ if (resourceLoader->documentLoader()->archiveResourceForURL(resourceLoader->request().url())) {
+ resourceLoader->start();
+ return;
+ }
+
HostInformation* host = hostForURL(resourceLoader->url(), CreateIfNotFound);
bool hadRequests = host->hasRequests();
host->schedule(resourceLoader, priority);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes