Bug 35879

Summary: Eliminate m_mightDownloadFromHandle
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Page LoadingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Trivial CC: darin, ddkilzer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
proposed patch darin: review+

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>.