Changeset 89303 in webkit


Ignore:
Timestamp:
Jun 20, 2011 4:11:52 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-06-20 Anders Carlsson <andersca@apple.com>

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):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89300 r89303  
     12011-06-20  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Web archive resource loads are scheduled together with network loads
     6        https://bugs.webkit.org/show_bug.cgi?id=63024
     7        <rdar://problem/9508564>
     8
     9        If the resource being loaded is loaded from a web archive we don't need to schedule the load
     10        since it won't touch the network.
     11
     12        * loader/ResourceLoadScheduler.cpp:
     13        (WebCore::ResourceLoadScheduler::scheduleLoad):
     14
    1152011-06-20  Pratik Solanki  <psolanki@apple.com>
    216
  • trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp

    r89086 r89303  
    2727
    2828#include "Document.h"
     29#include "DocumentLoader.h"
    2930#include "Frame.h"
    3031#include "FrameLoader.h"
     
    115116
    116117    LOG(ResourceLoading, "ResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data());
     118
     119    // 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.
     120    if (resourceLoader->documentLoader()->archiveResourceForURL(resourceLoader->request().url())) {
     121        resourceLoader->start();
     122        return;
     123    }
     124
    117125    HostInformation* host = hostForURL(resourceLoader->url(), CreateIfNotFound);   
    118126    bool hadRequests = host->hasRequests();
Note: See TracChangeset for help on using the changeset viewer.