Bug 35879 - Eliminate m_mightDownloadFromHandle
Summary: Eliminate m_mightDownloadFromHandle
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Trivial
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2010-03-08 14:25 PST by Alexey Proskuryakov
Modified: 2010-03-08 15:52 PST (History)
2 users (show)

See Also:

proposed patch (9.36 KB, patch)
2010-03-08 15:00 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-03-08 14:25:35 PST
It's only used on Mac, and doesn't seem to be really needed. The performance effect of not wrapping a connection delegate seems minimal, but the effect on code complexity is significant.

Besides, we weren't setting it correctly anyway - XMLHttpRequest was hitting the complex code path here.
Comment 1 Alexey Proskuryakov 2010-03-08 15:00:35 PST
Created attachment 50250 [details]
proposed patch
Comment 2 Darin Adler 2010-03-08 15:02:49 PST
Comment on attachment 50250 [details]
proposed patch

r=me assuming there is no measurable performance penalty to the extra level of indirection of every delegate call
Comment 3 Darin Adler 2010-03-08 15:03:24 PST
Comment on attachment 50250 [details]
proposed patch

> +    d->m_proxy = wkCreateNSURLConnectionDelegateProxy();

Is ownership correct here? The function has create in its name, but I don't see an adopt.
Comment 4 Alexey Proskuryakov 2010-03-08 15:11:28 PST
> Is ownership correct here?

I think so - there is an explicit release call below. But I'll change to adopt, to avoid current and future confusion.

    d->m_proxy = wkCreateNSURLConnectionDelegateProxy();
    [d->m_proxy.get() setDelegate:ResourceHandle::delegate()];
    [d->m_proxy.get() release];
Comment 5 Alexey Proskuryakov 2010-03-08 15:52:34 PST
Committed <http://trac.webkit.org/changeset/55688>.