Remove unnecessary parameter from DocumentLoader::scheduleArchiveLoad
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2013 18:31:09 +0000 (18:31 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2013 18:31:09 +0000 (18:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108654

Reviewed by Alexey Proskuryakov.

No new tests (No behavior change.)

Remove the KURL parameter parameter from this method which, in practice,
is always the same as the url of the ResourceRequest parameter.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::scheduleArchiveLoad):
* loader/DocumentLoader.h:

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::start):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/ResourceLoader.cpp

index e58efb8..96a4e22 100644 (file)
@@ -1,3 +1,22 @@
+2013-02-01  Brady Eidson  <beidson@apple.com>
+
+        Remove unnecessary parameter from DocumentLoader::scheduleArchiveLoad
+        https://bugs.webkit.org/show_bug.cgi?id=108654
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests (No behavior change.)
+
+        Remove the KURL parameter parameter from this method which, in practice,
+        is always the same as the url of the ResourceRequest parameter.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::scheduleArchiveLoad):
+        * loader/DocumentLoader.h:
+
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::start):
+
 2013-02-01  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: relax goto file matching again.
index 78037e3..9a98bb7 100644 (file)
@@ -690,14 +690,12 @@ void DocumentLoader::cancelPendingSubstituteLoad(ResourceLoader* loader)
 }
 
 #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
-bool DocumentLoader::scheduleArchiveLoad(ResourceLoader* loader, const ResourceRequest& request, const KURL& originalURL)
+bool DocumentLoader::scheduleArchiveLoad(ResourceLoader* loader, const ResourceRequest& request)
 {
-    if (request.url() == originalURL) {
-        if (ArchiveResource* resource = archiveResourceForURL(originalURL)) {
-            m_pendingSubstituteResources.set(loader, resource);
-            deliverSubstituteResourcesAfterDelay();
-            return true;
-        }
+    if (ArchiveResource* resource = archiveResourceForURL(request.url())) {
+        m_pendingSubstituteResources.set(loader, resource);
+        deliverSubstituteResourcesAfterDelay();
+        return true;
     }
 
     if (!m_archive)
index 7ef0477..8b843e4 100644 (file)
@@ -142,7 +142,7 @@ namespace WebCore {
         PassRefPtr<Archive> popArchiveForSubframe(const String& frameName, const KURL&);
         SharedBuffer* parsedArchiveData() const;
 
-        bool scheduleArchiveLoad(ResourceLoader*, const ResourceRequest&, const KURL&);
+        bool scheduleArchiveLoad(ResourceLoader*, const ResourceRequest&);
 #endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
 
         // Return the ArchiveResource for the URL only when loading an Archive
index 96a0d11..7328b24 100644 (file)
@@ -155,7 +155,7 @@ void ResourceLoader::start()
     ASSERT(m_deferredRequest.isNull());
 
 #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
-    if (m_documentLoader->scheduleArchiveLoad(this, m_request, m_request.url()))
+    if (m_documentLoader->scheduleArchiveLoad(this, m_request))
         return;
 #endif