[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
antti at apple.com
antti at apple.com
Wed Dec 22 15:57:21 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit dc790ada2df91fe84e45f649bfed02613f0f0224
Author: antti at apple.com <antti at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 17 04:52:02 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=49320
Minor ResourceLoadScheduler cleanups
Reviewed by Darin Adler.
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad):
(WebCore::ResourceLoadScheduler::servePendingRequests):
(WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
(WebCore::ResourceLoadScheduler::HostInformation::remove):
(WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
* loader/ResourceLoadScheduler.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 78d7042..e20614a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-16 Antti Koivisto <antti at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=49320
+ Minor ResourceLoadScheduler cleanups
+
+ * loader/ResourceLoadScheduler.cpp:
+ (WebCore::ResourceLoadScheduler::scheduleLoad):
+ (WebCore::ResourceLoadScheduler::servePendingRequests):
+ (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
+ (WebCore::ResourceLoadScheduler::HostInformation::remove):
+ (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
+ * loader/ResourceLoadScheduler.h:
+
2010-11-16 Dave Hyatt <hyatt at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/loader/ResourceLoadScheduler.cpp b/WebCore/loader/ResourceLoadScheduler.cpp
index f2bb0b5..80bea97 100644
--- a/WebCore/loader/ResourceLoadScheduler.cpp
+++ b/WebCore/loader/ResourceLoadScheduler.cpp
@@ -106,7 +106,7 @@ void ResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader, Priorit
{
ASSERT(resourceLoader);
#if !REQUEST_MANAGEMENT_ENABLED
- priority = High;
+ priority = HighestPriority;
#endif
LOG(ResourceLoading, "ResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data());
@@ -177,7 +177,7 @@ void ResourceLoadScheduler::servePendingRequests(HostInformation* host, Priority
{
LOG(ResourceLoading, "ResourceLoadScheduler::servePendingRequests HostInformation.m_name='%s'", host->name().latin1().data());
- for (int priority = High; priority >= minimumPriority; --priority) {
+ for (int priority = HighestPriority; priority >= minimumPriority; --priority) {
HostInformation::RequestQueue& requestsPending = host->requestsPending((Priority) priority);
while (!requestsPending.isEmpty()) {
@@ -235,7 +235,7 @@ ResourceLoadScheduler::HostInformation::HostInformation(const String& name, unsi
ResourceLoadScheduler::HostInformation::~HostInformation()
{
ASSERT(m_requestsLoading.isEmpty());
- for (unsigned p = 0; p <= High; p++)
+ for (unsigned p = 0; p <= HighestPriority; p++)
ASSERT(m_requestsPending[p].isEmpty());
}
@@ -257,7 +257,7 @@ void ResourceLoadScheduler::HostInformation::remove(ResourceLoader* resourceLoad
return;
}
- for (int priority = High; priority >= VeryLow; --priority) {
+ for (int priority = HighestPriority; priority >= LowestPriority; --priority) {
RequestQueue::iterator end = m_requestsPending[priority].end();
for (RequestQueue::iterator it = m_requestsPending[priority].begin(); it != end; ++it) {
if (*it == resourceLoader) {
@@ -272,7 +272,7 @@ bool ResourceLoadScheduler::HostInformation::hasRequests() const
{
if (!m_requestsLoading.isEmpty())
return true;
- for (unsigned p = 0; p <= High; p++) {
+ for (unsigned p = 0; p <= HighestPriority; p++) {
if (!m_requestsPending[p].isEmpty())
return true;
}
diff --git a/WebCore/loader/ResourceLoadScheduler.h b/WebCore/loader/ResourceLoadScheduler.h
index 11951b4..84f8845 100644
--- a/WebCore/loader/ResourceLoadScheduler.h
+++ b/WebCore/loader/ResourceLoadScheduler.h
@@ -46,8 +46,8 @@ class SubresourceLoaderClient;
class ResourceLoadScheduler : public Noncopyable {
public:
friend ResourceLoadScheduler* resourceLoadScheduler();
-
- enum Priority { VeryLow, Low, Medium, High };
+
+ enum Priority { VeryLow, Low, Medium, High, LowestPriority = VeryLow, HighestPriority = High };
PassRefPtr<SubresourceLoader> scheduleSubresourceLoad(Frame*, SubresourceLoaderClient*, const ResourceRequest&, Priority = Low, SecurityCheckPolicy = DoSecurityCheck, bool sendResourceLoadCallbacks = true, bool shouldContentSniff = true);
PassRefPtr<NetscapePlugInStreamLoader> schedulePluginStreamLoad(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&);
void addMainResourceLoad(ResourceLoader*);
@@ -82,7 +82,7 @@ private:
RequestQueue& requestsPending(Priority priority) { return m_requestsPending[priority]; }
private:
- RequestQueue m_requestsPending[High + 1];
+ RequestQueue m_requestsPending[HighestPriority + 1];
typedef HashSet<RefPtr<ResourceLoader> > RequestMap;
RequestMap m_requestsLoading;
const String m_name;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list