<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196461] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196461">196461</a></dd>
<dt>Author</dt> <dd>ryanhaddad@apple.com</dd>
<dt>Date</dt> <dd>2016-02-11 17:30:45 -0800 (Thu, 11 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/196453">r196453</a>.
https://bugs.webkit.org/show_bug.cgi?id=154142

This change broke internal iOS builds (Requested by ryanhaddad
on #webkit).

Reverted changeset:

&quot;Move Download authentication code to AuthenticationManager&quot;
https://bugs.webkit.org/show_bug.cgi?id=154132
http://trac.webkit.org/changeset/196453

Patch by Commit Queue &lt;commit-queue@webkit.org&gt; on 2016-02-11</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessDownloadsDownloadh">trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessDownloadsiosDownloadIOSmm">trunk/Source/WebKit2/NetworkProcess/Downloads/ios/DownloadIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessDownloadsmacDownloadMacmm">trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessDownloadssoupDownloadSoupcpp">trunk/Source/WebKit2/NetworkProcess/Downloads/soup/DownloadSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformEflcmake">trunk/Source/WebKit2/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2PlatformMaccmake">trunk/Source/WebKit2/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebKit2SharedAuthenticationAuthenticationManagercpp">trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedAuthenticationAuthenticationManagerh">trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/Source/WebKit2/Shared/Authentication/cocoa/</li>
<li>trunk/Source/WebKit2/Shared/Authentication/soup/</li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-02-11  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r196453.
+        https://bugs.webkit.org/show_bug.cgi?id=154142
+
+        This change broke internal iOS builds (Requested by ryanhaddad
+        on #webkit).
+
+        Reverted changeset:
+
+        &quot;Move Download authentication code to AuthenticationManager&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=154132
+        http://trac.webkit.org/changeset/196453
+
</ins><span class="cx"> 2016-02-11  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use the system PluginProcess.app for generating plug-in MIME type preferences
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessDownloadsDownloadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -113,6 +113,19 @@
</span><span class="cx">     DownloadAuthenticationClient* authenticationClient();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !USE(NETWORK_SESSION)
+    // Authentication
+    static void receivedCredential(const WebCore::AuthenticationChallenge&amp;, const WebCore::Credential&amp;);
+    static void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&amp;);
+    static void receivedCancellation(const WebCore::AuthenticationChallenge&amp;);
+    static void receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&amp;);
+    static void receivedChallengeRejection(const WebCore::AuthenticationChallenge&amp;);
+
+    void useCredential(const WebCore::AuthenticationChallenge&amp;, const WebCore::Credential&amp;);
+    void continueWithoutCredential(const WebCore::AuthenticationChallenge&amp;);
+    void cancelAuthenticationChallenge(const WebCore::AuthenticationChallenge&amp;);
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     // IPC::MessageSender
</span><span class="cx">     virtual IPC::Connection* messageSenderConnection() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessDownloadsiosDownloadIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/ios/DownloadIOS.mm (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/Downloads/ios/DownloadIOS.mm        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/ios/DownloadIOS.mm        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -157,6 +157,31 @@
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Download::receivedCredential(const AuthenticationChallenge&amp;, const Credential&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedCancellation(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedChallengeRejection(const WebCore::AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // USE(CFNETWORK) &amp;&amp; !USE(NETWORK_SESSION)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessDownloadsmacDownloadMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -131,6 +131,31 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Download::receivedCredential(const AuthenticationChallenge&amp; authenticationChallenge, const Credential&amp; credential)
+{
+    [authenticationChallenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+}
+
+void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&amp; authenticationChallenge)
+{
+    [authenticationChallenge.sender() continueWithoutCredentialForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+}
+
+void Download::receivedCancellation(const AuthenticationChallenge&amp; authenticationChallenge)
+{
+    [authenticationChallenge.sender() cancelAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+}
+
+void Download::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&amp; authenticationChallenge)
+{
+    [authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+}
+
+void Download::receivedChallengeRejection(const AuthenticationChallenge&amp; authenticationChallenge)
+{
+    [authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> @implementation WKDownloadAsDelegate
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessDownloadssoupDownloadSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/soup/DownloadSoup.cpp (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/Downloads/soup/DownloadSoup.cpp        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/soup/DownloadSoup.cpp        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -269,4 +269,44 @@
</span><span class="cx">     m_resourceHandle = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Download::receivedCredential(const AuthenticationChallenge&amp;, const Credential&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedCancellation(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::continueWithoutCredential(const AuthenticationChallenge &amp;)
+{
+    notImplemented();
+}
+
+void Download::useCredential(const AuthenticationChallenge&amp;, const Credential&amp;)
+{
+    notImplemented();
+}
+
+void Download::cancelAuthenticationChallenge(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedChallengeRejection(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformEfl.cmake (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformEfl.cmake        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/PlatformEfl.cmake        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -29,8 +29,6 @@
</span><span class="cx"> 
</span><span class="cx">     Shared/API/c/efl/WKArrayEfl.cpp
</span><span class="cx"> 
</span><del>-    Shared/Authentication/soup/AuthenticationManagerSoup.cpp
-
</del><span class="cx">     Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
</span><span class="cx">     Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp
</span><span class="cx">     Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -57,8 +57,6 @@
</span><span class="cx"> 
</span><span class="cx">     Shared/API/c/cairo/WKImageCairo.cpp
</span><span class="cx"> 
</span><del>-    Shared/Authentication/soup/AuthenticationManagerSoup.cpp
-
</del><span class="cx">     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
</span><span class="cx"> 
</span><span class="cx">     Shared/Plugins/unix/PluginSearchPath.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformMac.cmake (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformMac.cmake        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/PlatformMac.cmake        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -54,8 +54,6 @@
</span><span class="cx">     Shared/APIWebArchive.mm
</span><span class="cx">     Shared/APIWebArchiveResource.mm
</span><span class="cx"> 
</span><del>-    Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm
-
</del><span class="cx">     Shared/API/Cocoa/RemoteObjectInvocation.mm
</span><span class="cx">     Shared/API/Cocoa/RemoteObjectRegistry.mm
</span><span class="cx">     Shared/API/Cocoa/WKBrowsingContextHandle.mm
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAuthenticationAuthenticationManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">     auto pageID = frame-&gt;page()-&gt;pageID();
</span><span class="cx">     uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge
</span><span class="cx"> #if USE(NETWORK_SESSION)
</span><del>-        , { }
</del><ins>+        , ChallengeCompletionHandler()
</ins><span class="cx"> #endif
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx"> 
</span><span class="cx">     uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge
</span><span class="cx"> #if USE(NETWORK_SESSION)
</span><del>-        , { }
</del><ins>+        , ChallengeCompletionHandler()
</ins><span class="cx"> #endif
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="lines">@@ -219,12 +219,17 @@
</span><span class="cx">         challenge.completionHandler(AuthenticationChallengeDisposition::UseCredential, credential);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+#else
+    if (!coreClient) {
+        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
+        // We should not call Download::receivedCredential in the latter case.
+        Download::receivedCredential(challenge.challenge, credential);
+        return;
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (coreClient)
-        coreClient-&gt;receivedCredential(challenge.challenge, credential);
-    else
-        receivedCredential(challenge.challenge, credential);
</del><ins>+    ASSERT(coreClient);
+    coreClient-&gt;receivedCredential(challenge.challenge, credential);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AuthenticationManager::continueWithoutCredentialForChallenge(uint64_t challengeID)
</span><span class="lines">@@ -247,12 +252,17 @@
</span><span class="cx">         challenge.completionHandler(AuthenticationChallengeDisposition::UseCredential, Credential());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+#else
+    if (!coreClient) {
+        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
+        // We should not call Download::receivedCredential in the latter case.
+        Download::receivedRequestToContinueWithoutCredential(challenge.challenge);
+        return;
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (coreClient)
-        coreClient-&gt;receivedRequestToContinueWithoutCredential(challenge.challenge);
-    else
-        receivedRequestToContinueWithoutCredential(challenge.challenge);
</del><ins>+    ASSERT(coreClient);
+    coreClient-&gt;receivedRequestToContinueWithoutCredential(challenge.challenge);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AuthenticationManager::cancelChallenge(uint64_t challengeID)
</span><span class="lines">@@ -275,12 +285,17 @@
</span><span class="cx">         challenge.completionHandler(AuthenticationChallengeDisposition::Cancel, Credential());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+#else
+    if (!coreClient) {
+        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
+        // We should not call Download::receivedCredential in the latter case.
+        Download::receivedCancellation(challenge.challenge);
+        return;
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (coreClient)
-        coreClient-&gt;receivedCancellation(challenge.challenge);
-    else
-        receivedCancellation(challenge.challenge);
</del><ins>+    ASSERT(coreClient);
+    coreClient-&gt;receivedCancellation(challenge.challenge);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AuthenticationManager::performDefaultHandling(uint64_t challengeID)
</span><span class="lines">@@ -303,12 +318,17 @@
</span><span class="cx">         challenge.completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, Credential());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+#else
+    if (!coreClient) {
+        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
+        // We should not call Download::receivedCredential in the latter case.
+        Download::receivedRequestToPerformDefaultHandling(challenge.challenge);
+        return;
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (coreClient)
-        coreClient-&gt;receivedRequestToPerformDefaultHandling(challenge.challenge);
-    else
-        receivedRequestToPerformDefaultHandling(challenge.challenge);
</del><ins>+    ASSERT(coreClient);
+    coreClient-&gt;receivedRequestToPerformDefaultHandling(challenge.challenge);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AuthenticationManager::rejectProtectionSpaceAndContinue(uint64_t challengeID)
</span><span class="lines">@@ -331,12 +351,17 @@
</span><span class="cx">         challenge.completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, Credential());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+#else
+    if (!coreClient) {
+        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
+        // We should not call Download::receivedCredential in the latter case.
+        Download::receivedChallengeRejection(challenge.challenge);
+        return;
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (coreClient)
-        coreClient-&gt;receivedChallengeRejection(challenge.challenge);
-    else
-        receivedChallengeRejection(challenge.challenge);
</del><ins>+    ASSERT(coreClient);
+    coreClient-&gt;receivedChallengeRejection(challenge.challenge);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAuthenticationAuthenticationManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -76,12 +76,6 @@
</span><span class="cx"> 
</span><span class="cx">     uint64_t outstandingAuthenticationChallengeCount() const { return m_challenges.size(); }
</span><span class="cx"> 
</span><del>-    static void receivedCredential(const WebCore::AuthenticationChallenge&amp;, const WebCore::Credential&amp;);
-    static void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&amp;);
-    static void receivedCancellation(const WebCore::AuthenticationChallenge&amp;);
-    static void receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&amp;);
-    static void receivedChallengeRejection(const WebCore::AuthenticationChallenge&amp;);
-
</del><span class="cx"> private:
</span><span class="cx">     struct Challenge {
</span><span class="cx">         uint64_t pageID;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (196460 => 196461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-02-12 01:05:48 UTC (rev 196460)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-02-12 01:30:45 UTC (rev 196461)
</span><span class="lines">@@ -1039,7 +1039,6 @@
</span><span class="cx">                 52D5A1B01C57495A00DE34A3 /* WebVideoFullscreenManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 52D5A1AA1C57494E00DE34A3 /* WebVideoFullscreenManagerProxy.h */; };
</span><span class="cx">                 52D5A1B11C57496200DE34A3 /* WebVideoFullscreenManagerProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52D5A1AC1C57494E00DE34A3 /* WebVideoFullscreenManagerProxy.mm */; };
</span><span class="cx">                 52D5A1B71C574A0200DE34A3 /* WebVideoFullscreenManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52D5A1B41C5749F200DE34A3 /* WebVideoFullscreenManager.mm */; };
</span><del>-                5C052F261C6D3BD30076E919 /* AuthenticationManagerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */; };
</del><span class="cx">                 5C1426EC1C23F80900D41183 /* NetworkProcessCreationParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C1426E21C23F80500D41183 /* NetworkProcessCreationParameters.cpp */; };
</span><span class="cx">                 5C1426ED1C23F80900D41183 /* NetworkProcessCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426E31C23F80500D41183 /* NetworkProcessCreationParameters.h */; };
</span><span class="cx">                 5C1426EE1C23F80900D41183 /* NetworkProcessSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426E41C23F80500D41183 /* NetworkProcessSupplement.h */; };
</span><span class="lines">@@ -3131,7 +3130,6 @@
</span><span class="cx">                 52D5A1B21C5749F200DE34A3 /* WebVideoFullscreenManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenManager.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 52D5A1B31C5749F200DE34A3 /* WebVideoFullscreenManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebVideoFullscreenManager.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 52D5A1B41C5749F200DE34A3 /* WebVideoFullscreenManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebVideoFullscreenManager.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AuthenticationManagerCocoa.mm; path = Authentication/cocoa/AuthenticationManagerCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 5C1426E21C23F80500D41183 /* NetworkProcessCreationParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkProcessCreationParameters.cpp; path = NetworkProcess/NetworkProcessCreationParameters.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C1426E31C23F80500D41183 /* NetworkProcessCreationParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessCreationParameters.h; path = NetworkProcess/NetworkProcessCreationParameters.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C1426E41C23F80500D41183 /* NetworkProcessSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessSupplement.h; path = NetworkProcess/NetworkProcessSupplement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5533,7 +5531,6 @@
</span><span class="cx">                 518E8EF116B208F000E91429 /* Authentication */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                5C052F231C6D3AA10076E919 /* cocoa */,
</del><span class="cx">                                 518E8EF616B2091C00E91429 /* mac */,
</span><span class="cx">                                 518E8EF316B2091C00E91429 /* AuthenticationManager.cpp */,
</span><span class="cx">                                 518E8EF416B2091C00E91429 /* AuthenticationManager.h */,
</span><span class="lines">@@ -5652,14 +5649,6 @@
</span><span class="cx">                         name = IconDatabase;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><del>-                5C052F231C6D3AA10076E919 /* cocoa */ = {
-                        isa = PBXGroup;
-                        children = (
-                                5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */,
-                        );
-                        name = cocoa;
-                        sourceTree = &quot;&lt;group&gt;&quot;;
-                };
</del><span class="cx">                 5C1426F11C23F81700D41183 /* Downloads */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -9251,7 +9240,6 @@
</span><span class="cx">                                 BC8ACA1416670D89004C1941 /* ObjCObjectGraph.mm in Sources */,
</span><span class="cx">                                 BCCF673312C7F15C008F9C35 /* OriginAndDatabases.cpp in Sources */,
</span><span class="cx">                                 7C387434172F5615001BD88A /* PageBanner.cpp in Sources */,
</span><del>-                                5C052F261C6D3BD30076E919 /* AuthenticationManagerCocoa.mm in Sources */,
</del><span class="cx">                                 7C6D37FC172F555F009D2847 /* PageBannerMac.mm in Sources */,
</span><span class="cx">                                 0FCB4E6318BBE3D9000FCFC9 /* PageClientImpl.mm in Sources */,
</span><span class="cx">                                 0FCB4E4718BBE044000FCFC9 /* PageClientImplIOS.mm in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>