Bug 124367

Summary: [ASAN] WebKit2: Remove calls to dead DownloadAuthenticationClient code
Product: WebKit Reporter: David Farler <dfarler>
Component: WebKit2Assignee: David Farler <dfarler>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, beidson, ddkilzer, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
Patch ap: review+, ap: commit-queue-

Description David Farler 2013-11-14 09:29:50 PST
To unblock ASAN builds, remove the following dead calls:

Undefined symbols for architecture x86_64:
  "WebKit::Download::cancelAuthenticationChallenge(WebCore::AuthenticationChallenge const&)", referenced from:
      WebKit::DownloadAuthenticationClient::receivedCancellation(WebCore::AuthenticationChallenge const&) in DownloadAuthenticationClient.o
  "WebKit::Download::continueWithoutCredential(WebCore::AuthenticationChallenge const&)", referenced from:
      WebKit::DownloadAuthenticationClient::receivedRequestToContinueWithoutCredential(WebCore::AuthenticationChallenge const&) in DownloadAuthenticationClient.o
  "WebKit::Download::useCredential(WebCore::AuthenticationChallenge const&, WebCore::Credential const&)", referenced from:
      WebKit::DownloadAuthenticationClient::receivedCredential(WebCore::AuthenticationChallenge const&, WebCore::Credential const&) in DownloadAuthenticationClient.o

I believe we’ve seen this before but the solution was to just remove the dead code altogether. To speed things along, I’d like to just remove the calls to nowhere.
Comment 1 David Farler 2013-11-14 09:50:18 PST
Created attachment 216954 [details]
Patch
Comment 2 David Kilzer (:ddkilzer) 2013-11-15 02:53:45 PST
Why aren't these methods implemented in Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm?

Odd, all three are only implemented in Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp currently…as notImplemented().  LOL!

Seems like we need to pull this thread a little more to see what other code can simply be removed.
Comment 3 David Farler 2013-11-15 07:41:40 PST
(In reply to comment #2)
> Why aren't these methods implemented in Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm?
> 
> Odd, all three are only implemented in Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp currently…as notImplemented().  LOL!
> 
> Seems like we need to pull this thread a little more to see what other code can simply be removed.

I had filed this to originally unblock the builds:
https://bugs.webkit.org/show_bug.cgi?id=119667

But since the stale code is more widespread, we can use that to explore removing more. I just wanted to clean up the patched codebase on the ASAN builder to keep builds going.
Comment 4 David Kilzer (:ddkilzer) 2013-11-15 15:35:36 PST
(In reply to comment #3)
> (In reply to comment #2)
> > Why aren't these methods implemented in Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm?
> > 
> > Odd, all three are only implemented in Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp currently…as notImplemented().  LOL!
> > 
> > Seems like we need to pull this thread a little more to see what other code can simply be removed.
> 
> I had filed this to originally unblock the builds:
> https://bugs.webkit.org/show_bug.cgi?id=119667
> 
> But since the stale code is more widespread, we can use that to explore removing more. I just wanted to clean up the patched codebase on the ASAN builder to keep builds going.

Okay, makes sense to me.  Need a WebKit2 reviewer to stamp this, though, even though it's not an architectural change.
Comment 5 Alexey Proskuryakov 2013-11-15 17:01:22 PST
Comment on attachment 216954 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=216954&action=review

Anders may know more about the history of this code.

It would be very much worth it to delete as much as possible.

> Source/WebKit2/Shared/Downloads/DownloadAuthenticationClient.cpp:-45
> -    if (!m_download)
> -        return;
> -    m_download->useCredential(challenge, credential);

Please add a fixme referencing https://bugs.webkit.org/show_bug.cgi?id=119667

// FIXME (119667): This can probably be just removed.

> Source/WebKit2/Shared/Downloads/DownloadAuthenticationClient.cpp:-52
> -    if (!m_download)
> -        return;
> -    m_download->continueWithoutCredential(challenge);

Ditto.

> Source/WebKit2/Shared/Downloads/DownloadAuthenticationClient.cpp:-59
> -    if (!m_download)
> -        return;
> -    m_download->cancelAuthenticationChallenge(challenge);

Ditto.
Comment 6 David Farler 2013-11-18 11:42:10 PST
Committed r159441: <http://trac.webkit.org/changeset/159441>