[webkit-dev] Use of Frame by ResourceHandle
Adam Barth
abarth at webkit.org
Sun Sep 12 00:03:08 PDT 2010
On Sat, Sep 11, 2010 at 11:28 PM, Darin Fisher <darin at chromium.org> wrote:
> On Sat, Sep 11, 2010 at 11:07 PM, Adam Barth <abarth at webkit.org> wrote:
>> On Sat, Sep 11, 2010 at 10:52 PM, Darin Fisher <darin at chromium.org> wrote:
>> > For example, you
>> > cannot load any network requests in Chromium unless you know what Page
>> > (you
>> > need to know the routing ID of the tab) is requesting the resource. I
>> > assume PingLoader still generates the
>> > FrameLoaderClient::dispatchWillSendRequest notification, right?
>>
>> I don't think so. PingLoader talks directly to ResourceHandle.
>> PingLoader knows about the Frame, but it looks like it only uses it to
>> determine the outgoing referrer, to
>> addExtraFieldsToSubresourceRequest, and to grab the networking
>> context.
>
> Hmm... it seems like a bug that it doesn't call dispatchWillSendRequest.
> That does some important work that should apply to all network requests.
> Take a look at FrameLoaderClientImpl::dispatchWillSendRequest under
> WebKit/chromium/src/. It calls setFirstPartyForCookies in one case!
I haven't looked at it in the debugger. The code that uses PingLoader
might well call dispatchWillSendRequest on the ResourceRequest.
There are classes called MumbleLoader that inhabit every layer of the
loader. For example, PingLoader is a very low-level object. It's a
peer to SubresourceLoader, not to DocumentLoader, FrameLoader, or
CachedResourceLoader. One easy win would be to rename these classes
so that the different layers had different names...
Adam
More information about the webkit-dev
mailing list