[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

japhet at chromium.org japhet at chromium.org
Wed Dec 22 18:25:24 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f8d436916e56e8d5b257bce51ab113c9ef5f417c
Author: japhet at chromium.org <japhet at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 10 19:26:15 2010 +0000

    2010-12-10 Nate Chapin  <japhet at chromium.org>
    
            Reviewed by Antti Koivisto.
    
            Merge Loader and Request. Currently, Loader is a singleton attached
            to MemoryCache. Our goal is to remove knowledge of the loading process
            from MemoryCache, so we should attach Loader to CachedResourceLoader instead.
            Once Loader is moved off of MemoryCache, there's no reason it needs to be a singleton,
            which removes the main reason for Request existing as a separate class (to store per-request
            state that Loader couldn't).
    
            Loader will be given a more descriptive name in a later patch.
    
            https://bugs.webkit.org/show_bug.cgi?id=49837
    
            Refactor only, no new tests.
    
            * Android.mk:
            * CMakeLists.txt:
            * GNUmakefile.am:
            * WebCore.gypi:
            * WebCore.pro:
            * loader/FrameLoader.cpp:
            * loader/Request.cpp:
            * loader/Request.h:
            * loader/cache/CachedFont.cpp:
            * loader/cache/CachedImage.cpp:
            * loader/cache/CachedResource.cpp:
            * loader/cache/CachedResource.h:
            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::CachedResourceLoader):
            (WebCore::CachedResourceLoader::~CachedResourceLoader):
            (WebCore::CachedResourceLoader::requestImage):
            (WebCore::CachedResourceLoader::setAutoLoadImages):
            (WebCore::CachedResourceLoader::load):
            (WebCore::CachedResourceLoader::loadDone): Was setLoadInProgress(false),
                plus other CachedResourceLoader cleanup that had been handled in Loader.
            (WebCore::CachedResourceLoader::cancelRequests): Moved from Loader.
            (WebCore::CachedResourceLoader::requestCount):
            * loader/cache/CachedResourceLoader.h:
            (WebCore::CachedResourceLoader::loadFinishing): Was setLoadInProgress(true)
            * loader/cache/MemoryCache.h:
            * loader/loader.cpp:
            (WebCore::Loader::Loader):
            (WebCore::Loader::~Loader):
            (WebCore::Loader::load):
            (WebCore::Loader::willSendRequest):
            (WebCore::Loader::didFinishLoading):
            (WebCore::Loader::didFail):
            (WebCore::Loader::didReceiveResponse):
            (WebCore::Loader::didReceiveData):
            (WebCore::Loader::didReceiveCachedMetadata):
            * loader/loader.h:
            (WebCore::Loader::cachedResourceLoader):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 04bea8f..cf926f5 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -372,7 +372,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	loader/PolicyChecker.cpp \
 	loader/ProgressTracker.cpp \
 	loader/NavigationScheduler.cpp \
-	loader/Request.cpp \
 	loader/ResourceLoadNotifier.cpp \
 	loader/ResourceLoader.cpp \
 	loader/SubframeLoader.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 47b83cf..db7ab24 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1189,7 +1189,6 @@ SET(WebCore_SOURCES
     loader/PolicyChecker.cpp
     loader/ProgressTracker.cpp
     loader/NavigationScheduler.cpp
-    loader/Request.cpp
     loader/ResourceLoadNotifier.cpp
     loader/ResourceLoadScheduler.cpp
     loader/ResourceLoader.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 10879e2..96d1cc1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,58 @@
+2010-12-10 Nate Chapin  <japhet at chromium.org>
+
+        Reviewed by Antti Koivisto.
+
+        Merge Loader and Request. Currently, Loader is a singleton attached
+        to MemoryCache. Our goal is to remove knowledge of the loading process
+        from MemoryCache, so we should attach Loader to CachedResourceLoader instead.
+        Once Loader is moved off of MemoryCache, there's no reason it needs to be a singleton,
+        which removes the main reason for Request existing as a separate class (to store per-request
+        state that Loader couldn't).
+
+        Loader will be given a more descriptive name in a later patch.
+
+        https://bugs.webkit.org/show_bug.cgi?id=49837
+
+        Refactor only, no new tests.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * loader/FrameLoader.cpp:
+        * loader/Request.cpp:
+        * loader/Request.h:
+        * loader/cache/CachedFont.cpp:
+        * loader/cache/CachedImage.cpp:
+        * loader/cache/CachedResource.cpp:
+        * loader/cache/CachedResource.h:
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::CachedResourceLoader):
+        (WebCore::CachedResourceLoader::~CachedResourceLoader):
+        (WebCore::CachedResourceLoader::requestImage):
+        (WebCore::CachedResourceLoader::setAutoLoadImages):
+        (WebCore::CachedResourceLoader::load):
+        (WebCore::CachedResourceLoader::loadDone): Was setLoadInProgress(false),
+            plus other CachedResourceLoader cleanup that had been handled in Loader.
+        (WebCore::CachedResourceLoader::cancelRequests): Moved from Loader.
+        (WebCore::CachedResourceLoader::requestCount):
+        * loader/cache/CachedResourceLoader.h:
+        (WebCore::CachedResourceLoader::loadFinishing): Was setLoadInProgress(true)
+        * loader/cache/MemoryCache.h:
+        * loader/loader.cpp:
+        (WebCore::Loader::Loader):
+        (WebCore::Loader::~Loader):
+        (WebCore::Loader::load):
+        (WebCore::Loader::willSendRequest):
+        (WebCore::Loader::didFinishLoading):
+        (WebCore::Loader::didFail):
+        (WebCore::Loader::didReceiveResponse):
+        (WebCore::Loader::didReceiveData):
+        (WebCore::Loader::didReceiveCachedMetadata):
+        * loader/loader.h:
+        (WebCore::Loader::cachedResourceLoader):
+
 2010-12-10  Martin Robinson  <mrobinson at igalia.com>
 
         Unreviewed, rolling out r73703.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index da60f18..022dbb7 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2076,8 +2076,6 @@ webcore_sources += \
 	WebCore/loader/ProgressTracker.h \
 	WebCore/loader/NavigationScheduler.cpp \
 	WebCore/loader/NavigationScheduler.h \
-	WebCore/loader/Request.cpp \
-	WebCore/loader/Request.h \
 	WebCore/loader/ResourceLoader.cpp \
 	WebCore/loader/ResourceLoader.h \
 	WebCore/loader/ResourceLoadNotifier.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 327c623..1cfe59f 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -2148,8 +2148,6 @@
             'loader/ProgressTracker.h',
             'loader/NavigationScheduler.cpp',
             'loader/NavigationScheduler.h',
-            'loader/Request.cpp',
-            'loader/Request.h',
             'loader/ResourceLoader.cpp',
             'loader/ResourceLoader.h',
             'loader/ResourceLoadNotifier.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index cc9194c..07b7e8a 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1082,7 +1082,6 @@ SOURCES += \
     loader/PolicyChecker.cpp \
     loader/ProgressTracker.cpp \
     loader/NavigationScheduler.cpp \
-    loader/Request.cpp \
     loader/ResourceLoader.cpp \
     loader/ResourceLoadNotifier.cpp \
     loader/ResourceLoadScheduler.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 4a1e084..1fb056a 100755
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -24925,13 +24925,6 @@
 				RelativePath="..\loader\ProgressTracker.h"
 				>
 			</File>
-			<File
-				RelativePath="..\loader\Request.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\loader\Request.h"
-				>
 			</File>
 			<File
 				RelativePath="..\loader\ResourceLoader.cpp"
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 17807ed..3403e2f 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -5062,8 +5062,6 @@
 		BCB16C2A0979C3BD00467741 /* CachedResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C110979C3BD00467741 /* CachedResourceLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCB16C2C0979C3BD00467741 /* loader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C130979C3BD00467741 /* loader.cpp */; };
 		BCB16C2D0979C3BD00467741 /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C140979C3BD00467741 /* loader.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		BCB16C2E0979C3BD00467741 /* Request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C150979C3BD00467741 /* Request.cpp */; };
-		BCB16C2F0979C3BD00467741 /* Request.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C160979C3BD00467741 /* Request.h */; };
 		BCB773610C17853D00132BA4 /* JSNodeFilterCondition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */; };
 		BCB773620C17853D00132BA4 /* JSNodeFilterCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */; };
 		BCB773630C17853D00132BA4 /* JSNodeFilterCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */; };
@@ -11309,8 +11307,6 @@
 		BCB16C110979C3BD00467741 /* CachedResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedResourceLoader.h; sourceTree = "<group>"; };
 		BCB16C130979C3BD00467741 /* loader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = loader.cpp; sourceTree = "<group>"; };
 		BCB16C140979C3BD00467741 /* loader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = loader.h; sourceTree = "<group>"; };
-		BCB16C150979C3BD00467741 /* Request.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Request.cpp; sourceTree = "<group>"; };
-		BCB16C160979C3BD00467741 /* Request.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Request.h; sourceTree = "<group>"; };
 		BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCondition.cpp; sourceTree = "<group>"; };
 		BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeFilterCondition.h; sourceTree = "<group>"; };
 		BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = "<group>"; };
@@ -17838,8 +17834,6 @@
 				97059976107D975200A50A7C /* PolicyChecker.h */,
 				1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */,
 				1A2A68220B5BEDE70002A480 /* ProgressTracker.h */,
-				BCB16C150979C3BD00467741 /* Request.cpp */,
-				BCB16C160979C3BD00467741 /* Request.h */,
 				93E227DE0AF589AD00D48324 /* ResourceLoader.cpp */,
 				656D37270ADBA5DE00A4554D /* ResourceLoader.h */,
 				973E325410883B7C005BC493 /* ResourceLoadNotifier.cpp */,
@@ -21445,7 +21439,6 @@
 				93799EF90BF2743600D0F230 /* RenderWordBreak.h in Headers */,
 				A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */,
 				93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */,
-				BCB16C2F0979C3BD00467741 /* Request.h in Headers */,
 				F55B3DD01251F12D003EF269 /* ResetInputType.h in Headers */,
 				934F71420D5A6F4400018D69 /* ResourceError.h in Headers */,
 				934F713C0D5A6F1900018D69 /* ResourceErrorBase.h in Headers */,
@@ -24217,7 +24210,6 @@
 				93799EF80BF2743600D0F230 /* RenderWordBreak.cpp in Sources */,
 				A89CCC520F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.cpp in Sources */,
 				93309E09099E64920056E581 /* ReplaceSelectionCommand.cpp in Sources */,
-				BCB16C2E0979C3BD00467741 /* Request.cpp in Sources */,
 				F55B3DCF1251F12D003EF269 /* ResetInputType.cpp in Sources */,
 				934F713E0D5A6F2800018D69 /* ResourceErrorBase.cpp in Sources */,
 				514C76500CE9234E007EF3CD /* ResourceErrorMac.mm in Sources */,
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 426f454..9d5e7d0 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -429,7 +429,7 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolic
         doc->setReadyState(Document::Complete);
 
         if (CachedResourceLoader* cachedResourceLoader = doc->cachedResourceLoader())
-            cache()->loader()->cancelRequests(cachedResourceLoader);
+            cachedResourceLoader->cancelRequests();
 
 #if ENABLE(DATABASE)
         if (databasePolicy == DatabasePolicyStop)
diff --git a/WebCore/loader/Request.cpp b/WebCore/loader/Request.cpp
deleted file mode 100644
index 6ad6f9c..0000000
--- a/WebCore/loader/Request.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-    Copyright (C) 1998 Lars Knoll (knoll at mpi-hd.mpg.de)
-    Copyright (C) 2001 Dirk Mueller (mueller at kde.org)
-    Copyright (C) 2002 Waldo Bastian (bastian at kde.org)
-    Copyright (C) 2006 Samuel Weinig (sam.weinig at gmail.com)
-    Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "Request.h"
-
-#include "CachedResource.h"
-
-namespace WebCore {
-
-Request::Request(CachedResourceLoader* cachedResourceLoader, CachedResource* object, bool incremental, SecurityCheckPolicy shouldDoSecurityCheck, bool sendResourceLoadCallbacks)
-    : m_object(object)
-    , m_cachedResourceLoader(cachedResourceLoader)
-    , m_incremental(incremental)
-    , m_multipart(false)
-    , m_shouldDoSecurityCheck(shouldDoSecurityCheck)
-    , m_sendResourceLoadCallbacks(sendResourceLoadCallbacks)
-{
-    m_object->setRequest(this);
-}
-
-Request::~Request()
-{
-    m_object->setRequest(0);
-}
-
-} //namespace WebCore
diff --git a/WebCore/loader/Request.h b/WebCore/loader/Request.h
deleted file mode 100644
index b6de312..0000000
--- a/WebCore/loader/Request.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-    Copyright (C) 1998 Lars Knoll (knoll at mpi-hd.mpg.de)
-    Copyright (C) 2001 Dirk Mueller <mueller at kde.org>
-    Copyright (C) 2006 Samuel Weinig (sam.weinig at gmail.com)
-    Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef Request_h
-#define Request_h
-
-#include "FrameLoaderTypes.h"
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-    class CachedResource;
-    class CachedResourceLoader;
-
-    class Request : public Noncopyable {
-    public:
-        Request(CachedResourceLoader*, CachedResource*, bool incremental, SecurityCheckPolicy, bool sendResourceLoadCallbacks);
-        ~Request();
-        
-        CachedResource* cachedResource() const { return m_object; }
-        CachedResourceLoader* cachedResourceLoader() const { return m_cachedResourceLoader; }
-
-        bool isIncremental() const { return m_incremental; }
-        void setIsIncremental(bool b = true) { m_incremental = b; }
-
-        bool isMultipart() const { return m_multipart; }
-        void setIsMultipart(bool b = true) { m_multipart = b; }
-
-        SecurityCheckPolicy shouldDoSecurityCheck() const { return m_shouldDoSecurityCheck; }
-        bool sendResourceLoadCallbacks() const { return m_sendResourceLoadCallbacks; }
-        
-    private:
-        CachedResource* m_object;
-        CachedResourceLoader* m_cachedResourceLoader;
-        bool m_incremental;
-        bool m_multipart;
-        SecurityCheckPolicy m_shouldDoSecurityCheck;
-        bool m_sendResourceLoadCallbacks;
-    };
-
-} //namespace WebCore
-
-#endif // Request_h
diff --git a/WebCore/loader/cache/CachedFont.cpp b/WebCore/loader/cache/CachedFont.cpp
index 772a386..fef96ff 100644
--- a/WebCore/loader/cache/CachedFont.cpp
+++ b/WebCore/loader/cache/CachedFont.cpp
@@ -33,6 +33,7 @@
 
 #include "CachedResourceClient.h"
 #include "CachedResourceClientWalker.h"
+#include "CachedResourceLoader.h"
 #include "FontPlatformData.h"
 #include "MemoryCache.h"
 #include "SharedBuffer.h"
@@ -98,7 +99,7 @@ void CachedFont::beginLoadIfNeeded(CachedResourceLoader* dl)
 {
     if (!m_loadInitiated) {
         m_loadInitiated = true;
-        cache()->loader()->load(dl, this, false);
+        dl->load(this, false);
     }
 }
 
diff --git a/WebCore/loader/cache/CachedImage.cpp b/WebCore/loader/cache/CachedImage.cpp
index 29baef8..e543a14 100644
--- a/WebCore/loader/cache/CachedImage.cpp
+++ b/WebCore/loader/cache/CachedImage.cpp
@@ -32,7 +32,6 @@
 #include "Frame.h"
 #include "FrameLoaderTypes.h"
 #include "FrameView.h"
-#include "Request.h"
 #include "Settings.h"
 #include "SharedBuffer.h"
 #include <wtf/CurrentTime.h>
diff --git a/WebCore/loader/cache/CachedResource.cpp b/WebCore/loader/cache/CachedResource.cpp
index e952a54..09d0fbe 100644
--- a/WebCore/loader/cache/CachedResource.cpp
+++ b/WebCore/loader/cache/CachedResource.cpp
@@ -35,9 +35,9 @@
 #include "KURL.h"
 #include "Logging.h"
 #include "PurgeableBuffer.h"
-#include "Request.h"
 #include "ResourceHandle.h"
 #include "SharedBuffer.h"
+#include "loader.h"
 #include <wtf/CurrentTime.h>
 #include <wtf/MathExtras.h>
 #include <wtf/RefCountedLeakCounter.h>
@@ -106,7 +106,7 @@ CachedResource::~CachedResource()
 void CachedResource::load(CachedResourceLoader* cachedResourceLoader, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
 {
     m_sendResourceLoadCallbacks = sendResourceLoadCallbacks;
-    cache()->loader()->load(cachedResourceLoader, this, incremental, securityCheck, sendResourceLoadCallbacks);
+    cachedResourceLoader->load(this, incremental, securityCheck, sendResourceLoadCallbacks);
     m_loading = true;
 }
 
@@ -202,7 +202,7 @@ CachedMetadata* CachedResource::cachedMetadata(unsigned dataTypeID) const
     return m_cachedMetadata.get();
 }
 
-void CachedResource::setRequest(Request* request)
+void CachedResource::setRequest(Loader* request)
 {
     if (request && !m_request)
         m_status = Pending;
diff --git a/WebCore/loader/cache/CachedResource.h b/WebCore/loader/cache/CachedResource.h
index 9a54c53..b6681bc 100644
--- a/WebCore/loader/cache/CachedResource.h
+++ b/WebCore/loader/cache/CachedResource.h
@@ -43,8 +43,8 @@ class CachedResourceHandleBase;
 class CachedResourceLoader;
 class Frame;
 class InspectorResource;
+class Loader;
 class PurgeableBuffer;
-class Request;
 
 // A resource that is held in the cache. Classes who want to use this object should derive
 // from CachedResourceClient, to get the function calls in case the requested data has arrived.
@@ -150,7 +150,7 @@ public:
     void setInLiveDecodedResourcesList(bool b) { m_inLiveDecodedResourcesList = b; }
     bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; }
     
-    void setRequest(Request*);
+    void setRequest(Loader*);
 
     SharedBuffer* data() const { ASSERT(!m_purgeableData); return m_data.get(); }
 
@@ -216,7 +216,7 @@ protected:
 
     String m_url;
     String m_accept;
-    Request* m_request;
+    Loader* m_request;
 
     ResourceResponse m_response;
     double m_responseTimestamp;
diff --git a/WebCore/loader/cache/CachedResourceLoader.cpp b/WebCore/loader/cache/CachedResourceLoader.cpp
index 15c5f03..421640a 100644
--- a/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/WebCore/loader/cache/CachedResourceLoader.cpp
@@ -55,7 +55,7 @@ CachedResourceLoader::CachedResourceLoader(Document* document)
     , m_document(document)
     , m_requestCount(0)
     , m_autoLoadImages(true)
-    , m_loadInProgress(false)
+    , m_loadFinishing(false)
     , m_allowStaleResources(false)
 {
     m_cache->addCachedResourceLoader(this);
@@ -63,9 +63,7 @@ CachedResourceLoader::CachedResourceLoader(Document* document)
 
 CachedResourceLoader::~CachedResourceLoader()
 {
-    if (m_requestCount)
-        m_cache->loader()->cancelRequests(this);
-
+    cancelRequests();
     clearPreloads();
     DocumentResourceMap::iterator end = m_documentResources.end();
     for (DocumentResourceMap::iterator it = m_documentResources.begin(); it != end; ++it)
@@ -137,7 +135,7 @@ CachedImage* CachedResourceLoader::requestImage(const String& url)
     CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, url, String()));
     if (autoLoadImages() && resource && resource->stillNeedsLoad()) {
         resource->setLoading(true);
-        cache()->loader()->load(this, resource, true);
+        load(resource, true);
     }
     return resource;
 }
@@ -314,7 +312,7 @@ void CachedResourceLoader::setAutoLoadImages(bool enable)
             CachedImage* image = const_cast<CachedImage*>(static_cast<const CachedImage*>(resource));
 
             if (image->stillNeedsLoad())
-                cache()->loader()->load(this, image, true);
+                load(image, true);
         }
     }
 }
@@ -334,11 +332,36 @@ void CachedResourceLoader::removeCachedResource(CachedResource* resource) const
     m_documentResources.remove(resource->url());
 }
 
-void CachedResourceLoader::setLoadInProgress(bool load)
+void CachedResourceLoader::load(CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
+{
+    incrementRequestCount(resource);
+
+    RefPtr<Loader> request = Loader::load(this, resource, incremental, securityCheck, sendResourceLoadCallbacks);
+    if (request)
+        m_requests.add(request);
+}
+
+void CachedResourceLoader::loadDone(Loader* request)
 {
-    m_loadInProgress = load;
-    if (!load && frame())
+    m_loadFinishing = false;
+    RefPtr<Loader> protect(request);
+    if (request)
+        m_requests.remove(request);
+    if (frame())
         frame()->loader()->loadDone();
+    checkForPendingPreloads();
+}
+
+void CachedResourceLoader::cancelRequests()
+{
+    clearPendingPreloads();
+    Vector<Loader*, 256> requestsToCancel;
+    RequestSet::iterator end = m_requests.end();
+    for (RequestSet::iterator i = m_requests.begin(); i != end; ++i)
+        requestsToCancel.append((*i).get());
+
+    for (unsigned i = 0; i < requestsToCancel.size(); ++i)
+        requestsToCancel[i]->didFail(true);
 }
 
 void CachedResourceLoader::checkCacheObjectStatus(CachedResource* resource)
@@ -370,7 +393,7 @@ void CachedResourceLoader::decrementRequestCount(const CachedResource* res)
 
 int CachedResourceLoader::requestCount()
 {
-    if (loadInProgress())
+    if (m_loadFinishing)
          return m_requestCount + 1;
     return m_requestCount;
 }
diff --git a/WebCore/loader/cache/CachedResourceLoader.h b/WebCore/loader/cache/CachedResourceLoader.h
index f371a0e..0e20b5a 100644
--- a/WebCore/loader/cache/CachedResourceLoader.h
+++ b/WebCore/loader/cache/CachedResourceLoader.h
@@ -29,6 +29,7 @@
 #include "CachedResource.h"
 #include "CachedResourceHandle.h"
 #include "CachePolicy.h"
+#include "loader.h"
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/ListHashSet.h>
@@ -86,8 +87,10 @@ public:
 
     void removeCachedResource(CachedResource*) const;
 
-    void setLoadInProgress(bool);
-    bool loadInProgress() const { return m_loadInProgress; }
+    void load(CachedResource*, bool incremental = false, SecurityCheckPolicy = DoSecurityCheck, bool sendResourceLoadCallbacks = true);
+    void loadFinishing() { m_loadFinishing = true; }
+    void loadDone(Loader*);
+    void cancelRequests();
     
     void setAllowStaleResources(bool allowStaleResources) { m_allowStaleResources = allowStaleResources; }
 
@@ -113,6 +116,9 @@ private:
     HashSet<String> m_reloadedURLs;
     mutable DocumentResourceMap m_documentResources;
     Document* m_document;
+
+    typedef HashSet<RefPtr<Loader> > RequestSet;
+    RequestSet m_requests;
     
     int m_requestCount;
     
@@ -126,7 +132,7 @@ private:
     
     //29 bits left
     bool m_autoLoadImages : 1;
-    bool m_loadInProgress : 1;
+    bool m_loadFinishing : 1;
     bool m_allowStaleResources : 1;
 };
 
diff --git a/WebCore/loader/cache/MemoryCache.h b/WebCore/loader/cache/MemoryCache.h
index 15ce9da..7439ee8 100644
--- a/WebCore/loader/cache/MemoryCache.h
+++ b/WebCore/loader/cache/MemoryCache.h
@@ -28,7 +28,6 @@
 #include "CachePolicy.h"
 #include "CachedResource.h"
 #include "PlatformString.h"
-#include "loader.h"
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/Noncopyable.h>
@@ -104,9 +103,6 @@ public:
         TypeStatistic fonts;
     };
 
-    // The loader that fetches resources.
-    Loader* loader() { return &m_loader; }
-
     // Request resources from the cache.  A load will be initiated and a cache object created if the object is not
     // found in the cache.
     CachedResource* requestResource(CachedResourceLoader*, CachedResource::Type, const KURL& url, const String& charset, bool isPreload = false, bool forHistory = false);
@@ -191,7 +187,6 @@ private:
 
     // Member variables.
     HashSet<CachedResourceLoader*> m_cachedResourceLoaders;
-    Loader m_loader;
 
     bool m_disabled;  // Whether or not the cache is enabled.
     bool m_pruneEnabled;
diff --git a/WebCore/loader/loader.cpp b/WebCore/loader/loader.cpp
index 1f2ced3..cf51d9a 100644
--- a/WebCore/loader/loader.cpp
+++ b/WebCore/loader/loader.cpp
@@ -31,7 +31,6 @@
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "Logging.h"
-#include "Request.h"
 #include "ResourceHandle.h"
 #include "ResourceLoadScheduler.h"
 #include "ResourceRequest.h"
@@ -42,11 +41,6 @@
 #include <wtf/text/CString.h>
 
 namespace WebCore {
-
-Loader::~Loader()
-{    
-    ASSERT_NOT_REACHED();
-}
     
 static ResourceRequest::TargetType cachedResourceTypeToTargetType(CachedResource::Type type)
 {
@@ -93,22 +87,33 @@ static ResourceLoadScheduler::Priority determinePriority(const CachedResource* r
     return ResourceLoadScheduler::Low;
 }
 
-void Loader::load(CachedResourceLoader* cachedResourceLoader, CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
+Loader::Loader(CachedResourceLoader* cachedResourceLoader, CachedResource* resource, bool incremental)
+    : m_cachedResourceLoader(cachedResourceLoader)
+    , m_resource(resource)
+    , m_incremental(incremental)
+    , m_multipart(false)
+    , m_finishing(false)
 {
+    m_resource->setRequest(this);
+}
 
-    ASSERT(cachedResourceLoader);
-    Request* request = new Request(cachedResourceLoader, resource, incremental, securityCheck, sendResourceLoadCallbacks);
+Loader::~Loader()
+{
+    m_resource->setRequest(0);
+}
 
-    cachedResourceLoader->incrementRequestCount(request->cachedResource());
+PassRefPtr<Loader> Loader::load(CachedResourceLoader* cachedResourceLoader, CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
+{
+    RefPtr<Loader> request = adoptRef(new Loader(cachedResourceLoader, resource, incremental));
 
-    ResourceRequest resourceRequest(request->cachedResource()->url());
-    resourceRequest.setTargetType(cachedResourceTypeToTargetType(request->cachedResource()->type()));
+    ResourceRequest resourceRequest(resource->url());
+    resourceRequest.setTargetType(cachedResourceTypeToTargetType(resource->type()));
 
-    if (!request->cachedResource()->accept().isEmpty())
-        resourceRequest.setHTTPAccept(request->cachedResource()->accept());
+    if (!resource->accept().isEmpty())
+        resourceRequest.setHTTPAccept(resource->accept());
 
-    if (request->cachedResource()->isCacheValidator()) {
-        CachedResource* resourceToRevalidate = request->cachedResource()->resourceToRevalidate();
+    if (resource->isCacheValidator()) {
+        CachedResource* resourceToRevalidate = resource->resourceToRevalidate();
         ASSERT(resourceToRevalidate->canUseCacheValidator());
         ASSERT(resourceToRevalidate->isLoaded());
         const String& lastModified = resourceToRevalidate->response().httpHeaderField("Last-Modified");
@@ -125,230 +130,171 @@ void Loader::load(CachedResourceLoader* cachedResourceLoader, CachedResource* re
     }
     
 #if ENABLE(LINK_PREFETCH)
-    if (request->cachedResource()->type() == CachedResource::LinkPrefetch)
+    if (resource->type() == CachedResource::LinkPrefetch)
         resourceRequest.setHTTPHeaderField("X-Purpose", "prefetch");
 #endif
 
     RefPtr<SubresourceLoader> loader = resourceLoadScheduler()->scheduleSubresourceLoad(cachedResourceLoader->document()->frame(),
-        this, resourceRequest, determinePriority(resource), request->shouldDoSecurityCheck(), request->sendResourceLoadCallbacks());
-    if (loader && !loader->reachedTerminalState())
-        m_requestsLoading.add(loader.release(), request);
-    else {
+        request.get(), resourceRequest, determinePriority(resource), securityCheck, sendResourceLoadCallbacks);
+    if (!loader || loader->reachedTerminalState()) {
         // FIXME: What if resources in other frames were waiting for this revalidation?
-        LOG(ResourceLoading, "Cannot start loading '%s'", request->cachedResource()->url().latin1().data());             
-        cachedResourceLoader->decrementRequestCount(request->cachedResource());
-        cachedResourceLoader->setLoadInProgress(true);
+        LOG(ResourceLoading, "Cannot start loading '%s'", resource->url().latin1().data());
+        cachedResourceLoader->decrementRequestCount(resource);
+        cachedResourceLoader->loadFinishing();
         if (resource->resourceToRevalidate()) 
             cache()->revalidationFailed(resource); 
         resource->error(CachedResource::LoadError);
-        cachedResourceLoader->setLoadInProgress(false);
-        delete request;
+        cachedResourceLoader->loadDone(0);
+        return 0;
     }
+    request->m_loader = loader;
+    return request.release();
 }
 
-void Loader::cancelRequests(CachedResourceLoader* cachedResourceLoader)
+void Loader::willSendRequest(SubresourceLoader*, ResourceRequest&, const ResourceResponse&)
 {
-    cachedResourceLoader->clearPendingPreloads();
-
-    Vector<SubresourceLoader*, 256> loadersToCancel;
-    RequestMap::iterator end = m_requestsLoading.end();
-    for (RequestMap::iterator i = m_requestsLoading.begin(); i != end; ++i) {
-        Request* r = i->second;
-        if (r->cachedResourceLoader() == cachedResourceLoader)
-            loadersToCancel.append(i->first.get());
-    }
-
-    for (unsigned i = 0; i < loadersToCancel.size(); ++i) {
-        SubresourceLoader* loader = loadersToCancel[i];
-        didFail(loader, true);
-    }
-}
-
-void Loader::willSendRequest(SubresourceLoader* loader, ResourceRequest&, const ResourceResponse&)
-{
-    RequestMap::iterator i = m_requestsLoading.find(loader);
-    if (i == m_requestsLoading.end())
-        return;
-    
-    Request* request = i->second;
-    request->cachedResource()->setRequestedFromNetworkingLayer();
+    m_resource->setRequestedFromNetworkingLayer();
 }
 
 void Loader::didFinishLoading(SubresourceLoader* loader)
 {
-    RequestMap::iterator i = m_requestsLoading.find(loader);
-    if (i == m_requestsLoading.end())
+    if (m_finishing)
         return;
-    
-    Request* request = i->second;
-    m_requestsLoading.remove(i);
-    CachedResourceLoader* cachedResourceLoader = request->cachedResourceLoader();
-    // Prevent the document from being destroyed before we are done with
-    // the cachedResourceLoader that it will delete when the document gets deleted.
-    RefPtr<Document> protector(cachedResourceLoader->document());
-    if (!request->isMultipart())
-        cachedResourceLoader->decrementRequestCount(request->cachedResource());
 
-    CachedResource* resource = request->cachedResource();
-    ASSERT(!resource->resourceToRevalidate());
+    ASSERT(loader == m_loader.get());
+    ASSERT(!m_resource->resourceToRevalidate());
+    LOG(ResourceLoading, "Received '%s'.", m_resource->url().latin1().data());
 
-    LOG(ResourceLoading, "Received '%s'.", resource->url().latin1().data());
+    // Prevent the document from being destroyed before we are done with
+    // the cachedResourceLoader that it will delete when the document gets deleted.
+    RefPtr<Document> protector(m_cachedResourceLoader->document());
+    if (!m_multipart)
+        m_cachedResourceLoader->decrementRequestCount(m_resource);
+    m_finishing = true;
 
     // If we got a 4xx response, we're pretending to have received a network
     // error, so we can't send the successful data() and finish() callbacks.
-    if (!resource->errorOccurred()) {
-        cachedResourceLoader->setLoadInProgress(true);
-        resource->data(loader->resourceData(), true);
-        if (!resource->errorOccurred())
-            resource->finish();
+    if (!m_resource->errorOccurred()) {
+        m_cachedResourceLoader->loadFinishing();
+        m_resource->data(loader->resourceData(), true);
+        if (!m_resource->errorOccurred())
+            m_resource->finish();
     }
-
-    delete request;
-    cachedResourceLoader->setLoadInProgress(false);    
-    cachedResourceLoader->checkForPendingPreloads();
+    m_cachedResourceLoader->loadDone(this);
 }
 
-void Loader::didFail(SubresourceLoader* loader, const ResourceError&)
+void Loader::didFail(SubresourceLoader*, const ResourceError&)
 {
-    didFail(loader);
+    if (!m_loader)
+        return;
+    didFail();
 }
 
-void Loader::didFail(SubresourceLoader* loader, bool cancelled)
+void Loader::didFail(bool cancelled)
 {
-    loader->clearClient();
-
-    RequestMap::iterator i = m_requestsLoading.find(loader);
-    if (i == m_requestsLoading.end())
+    if (m_finishing)
         return;
-    
-    Request* request = i->second;
-    m_requestsLoading.remove(i);
-    CachedResourceLoader* cachedResourceLoader = request->cachedResourceLoader();
-    // Prevent the document from being destroyed before we are done with
-    // the cachedResourceLoader that it will delete when the document gets deleted.
-    RefPtr<Document> protector(cachedResourceLoader->document());
-    if (!request->isMultipart())
-        cachedResourceLoader->decrementRequestCount(request->cachedResource());
 
-    CachedResource* resource = request->cachedResource();
+    LOG(ResourceLoading, "Failed to load '%s' (cancelled=%d).\n", m_resource->url().latin1().data(), cancelled);
 
-    LOG(ResourceLoading, "Failed to load '%s' (cancelled=%d).\n", resource->url().latin1().data(), cancelled);
+    // Prevent the document from being destroyed before we are done with
+    // the cachedResourceLoader that it will delete when the document gets deleted.
+    RefPtr<Document> protector(m_cachedResourceLoader->document());
+    if (!m_multipart)
+        m_cachedResourceLoader->decrementRequestCount(m_resource);
+    m_finishing = true;
+    m_loader->clearClient();
 
-    if (resource->resourceToRevalidate())
-        cache()->revalidationFailed(resource);
+    if (m_resource->resourceToRevalidate())
+        cache()->revalidationFailed(m_resource);
 
     if (!cancelled) {
-        cachedResourceLoader->setLoadInProgress(true);
-        resource->error(CachedResource::LoadError);
+        m_cachedResourceLoader->loadFinishing();
+        m_resource->error(CachedResource::LoadError);
     }
+
+    if (cancelled || !m_resource->isPreloaded())
+        cache()->remove(m_resource);
     
-    cachedResourceLoader->setLoadInProgress(false);
-    if (cancelled || !resource->isPreloaded())
-        cache()->remove(resource);
-    
-    delete request;
-    
-    cachedResourceLoader->checkForPendingPreloads();
+    m_cachedResourceLoader->loadDone(this);
 }
 
 void Loader::didReceiveResponse(SubresourceLoader* loader, const ResourceResponse& response)
 {
-    Request* request = m_requestsLoading.get(loader);
-    
-    // FIXME: This is a workaround for <rdar://problem/5236843>
-    // If a load starts while the frame is still in the provisional state 
-    // (this can be the case when loading the user style sheet), committing the load then causes all
-    // requests to be removed from the m_requestsLoading map. This means that request might be null here.
-    // In that case we just return early. 
-    // ASSERT(request);
-    if (!request)
-        return;
-    
-    CachedResource* resource = request->cachedResource();
-    
-    if (resource->isCacheValidator()) {
+    ASSERT(loader == m_loader.get());
+    if (m_resource->isCacheValidator()) {
         if (response.httpStatusCode() == 304) {
             // 304 Not modified / Use local copy
-            m_requestsLoading.remove(loader);
             loader->clearClient();
-            request->cachedResourceLoader()->decrementRequestCount(request->cachedResource());
+            RefPtr<Document> protector(m_cachedResourceLoader->document());
+            m_cachedResourceLoader->decrementRequestCount(m_resource);
+            m_finishing = true;
 
             // Existing resource is ok, just use it updating the expiration time.
-            cache()->revalidationSucceeded(resource, response);
+            cache()->revalidationSucceeded(m_resource, response);
             
-            if (request->cachedResourceLoader()->frame())
-                request->cachedResourceLoader()->frame()->loader()->checkCompleted();
-
-            delete request;
+            if (m_cachedResourceLoader->frame())
+                m_cachedResourceLoader->frame()->loader()->checkCompleted();
 
+            m_cachedResourceLoader->loadDone(this);
             return;
         } 
         // Did not get 304 response, continue as a regular resource load.
-        cache()->revalidationFailed(resource);
+        cache()->revalidationFailed(m_resource);
     }
 
-    resource->setResponse(response);
+    m_resource->setResponse(response);
 
     String encoding = response.textEncodingName();
     if (!encoding.isNull())
-        resource->setEncoding(encoding);
+        m_resource->setEncoding(encoding);
     
-    if (request->isMultipart()) {
-        ASSERT(resource->isImage());
-        static_cast<CachedImage*>(resource)->clear();
-        if (request->cachedResourceLoader()->frame())
-            request->cachedResourceLoader()->frame()->loader()->checkCompleted();
+    if (m_multipart) {
+        ASSERT(m_resource->isImage());
+        static_cast<CachedImage*>(m_resource)->clear();
+        if (m_cachedResourceLoader->frame())
+            m_cachedResourceLoader->frame()->loader()->checkCompleted();
     } else if (response.isMultipart()) {
-        request->setIsMultipart(true);
+        m_multipart = true;
         
         // We don't count multiParts in a CachedResourceLoader's request count
-        request->cachedResourceLoader()->decrementRequestCount(request->cachedResource());
+        m_cachedResourceLoader->decrementRequestCount(m_resource);
 
         // If we get a multipart response, we must have a handle
         ASSERT(loader->handle());
-        if (!resource->isImage())
+        if (!m_resource->isImage())
             loader->handle()->cancel();
     }
 }
 
 void Loader::didReceiveData(SubresourceLoader* loader, const char* data, int size)
 {
-    Request* request = m_requestsLoading.get(loader);
-    if (!request)
-        return;
-
-    CachedResource* resource = request->cachedResource();    
-    ASSERT(!resource->isCacheValidator());
+    ASSERT(loader == m_loader.get());
+    ASSERT(!m_resource->isCacheValidator());
     
-    if (resource->errorOccurred())
+    if (m_resource->errorOccurred())
         return;
 
-    if (resource->response().httpStatusCode() >= 400) {
-        if (!resource->shouldIgnoreHTTPStatusCodeErrors())
-            resource->error(CachedResource::LoadError);
+    if (m_resource->response().httpStatusCode() >= 400) {
+        if (!m_resource->shouldIgnoreHTTPStatusCodeErrors())
+            m_resource->error(CachedResource::LoadError);
         return;
     }
 
     // Set the data.
-    if (request->isMultipart()) {
+    if (m_multipart) {
         // The loader delivers the data in a multipart section all at once, send eof.
         // The resource data will change as the next part is loaded, so we need to make a copy.
         RefPtr<SharedBuffer> copiedData = SharedBuffer::create(data, size);
-        resource->data(copiedData.release(), true);
-    } else if (request->isIncremental())
-        resource->data(loader->resourceData(), false);
+        m_resource->data(copiedData.release(), true);
+    } else if (m_incremental)
+        m_resource->data(loader->resourceData(), false);
 }
 
-void Loader::didReceiveCachedMetadata(SubresourceLoader* loader, const char* data, int size)
+void Loader::didReceiveCachedMetadata(SubresourceLoader*, const char* data, int size)
 {
-    Request* request = m_requestsLoading.get(loader);
-    if (!request)
-        return;
-
-    CachedResource* resource = request->cachedResource();    
-    ASSERT(!resource->isCacheValidator());
-
-    resource->setSerializedCachedMetadata(data, size);
+    ASSERT(!m_resource->isCacheValidator());
+    m_resource->setSerializedCachedMetadata(data, size);
 }
 
 } //namespace WebCore
diff --git a/WebCore/loader/loader.h b/WebCore/loader/loader.h
index 818f56f..123d503 100644
--- a/WebCore/loader/loader.h
+++ b/WebCore/loader/loader.h
@@ -35,24 +35,29 @@ namespace WebCore {
     class CachedResourceLoader;
     class Request;
 
-    class Loader : public Noncopyable, private SubresourceLoaderClient {
+    class Loader : public RefCounted<Loader>, private SubresourceLoaderClient {
     public:
+        static PassRefPtr<Loader> load(CachedResourceLoader*, CachedResource*, bool incremental, SecurityCheckPolicy, bool sendResourceLoadCallbacks);\
         ~Loader();
+        void didFail(bool cancelled = false);
 
-        void load(CachedResourceLoader*, CachedResource*, bool incremental = true, SecurityCheckPolicy = DoSecurityCheck, bool sendResourceLoadCallbacks = true);
-        void cancelRequests(CachedResourceLoader*);
+        CachedResourceLoader* cachedResourceLoader() const { return m_cachedResourceLoader; }
 
     private:
+        Loader(CachedResourceLoader*, CachedResource*, bool incremental);
         virtual void willSendRequest(SubresourceLoader*, ResourceRequest&, const ResourceResponse&);
         virtual void didReceiveResponse(SubresourceLoader*, const ResourceResponse&);
         virtual void didReceiveData(SubresourceLoader*, const char*, int);
         virtual void didReceiveCachedMetadata(SubresourceLoader*, const char*, int);
         virtual void didFinishLoading(SubresourceLoader*);
         virtual void didFail(SubresourceLoader*, const ResourceError&);
-        void didFail(SubresourceLoader*, bool cancelled = false);
-        
-        typedef HashMap<RefPtr<SubresourceLoader>, Request*> RequestMap;
-        RequestMap m_requestsLoading;
+
+        RefPtr<SubresourceLoader> m_loader;
+        CachedResourceLoader* m_cachedResourceLoader;
+        CachedResource* m_resource;
+        bool m_incremental;
+        bool m_multipart;
+        bool m_finishing;
     };
 
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list