Bug 56647 - Resource load delegates invoked too early
Summary: Resource load delegates invoked too early
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-03-18 08:27 PDT by Antti Koivisto
Modified: 2018-08-28 12:46 PDT (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2011-03-18 08:27:31 PDT
ResourceLoadScheduler constructs SubresourceLoader object when it learns about a new resource load. SubresourceLoader::create() calls init() which invokes the delegates.

This means that delegates may be invoked well before the load actually starts, making clients show wrong information. They also get invoked even when the ResourceLoadScheduler is suspended.
Comment 1 Alexey Proskuryakov 2011-03-18 09:08:52 PDT
I'm wondering if this is the reason for bug 53828.
Comment 2 Nate Chapin 2011-03-18 09:42:43 PDT
See also http://trac.webkit.org/changeset/74453, which made the case for calling willSendRequest() in init().

It looks like either clients show wrong information because of willSendRequest() being called before scheduling, or we have to schedule based on dubious information because willSendRequest() hasn't been given a chance to modify the ResourceRequest.