Title: [140037] trunk/Source/WebCore
Revision
140037
Author
a...@apple.com
Date
2013-01-17 13:50:50 -0800 (Thu, 17 Jan 2013)

Log Message

        Fix a logic error in AuthenticationChallengeMac
        https://bugs.webkit.org/show_bug.cgi?id=107164

        Reviewed by Brady Eidson.

        No new tests, as this is not currently observable.

        * platform/network/cf/AuthenticationCF.cpp:
        (WebCore::createCF): Added a FIXME about making this more like Mac counterpart.

        * platform/network/cf/AuthenticationChallenge.h:
        (AuthenticationChallenge): Corrected an slightly misleading explanation.

        * platform/network/mac/AuthenticationMac.mm:
        (WebCore::AuthenticationChallenge::setAuthenticationClient): Don't create a dummy
        m_nsChallenge object in place of a nil one.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140036 => 140037)


--- trunk/Source/WebCore/ChangeLog	2013-01-17 21:37:18 UTC (rev 140036)
+++ trunk/Source/WebCore/ChangeLog	2013-01-17 21:50:50 UTC (rev 140037)
@@ -1,3 +1,22 @@
+2013-01-17  Alexey Proskuryakov  <a...@apple.com>
+
+        Fix a logic error in AuthenticationChallengeMac
+        https://bugs.webkit.org/show_bug.cgi?id=107164
+
+        Reviewed by Brady Eidson.
+
+        No new tests, as this is not currently observable.
+
+        * platform/network/cf/AuthenticationCF.cpp:
+        (WebCore::createCF): Added a FIXME about making this more like Mac counterpart.
+
+        * platform/network/cf/AuthenticationChallenge.h:
+        (AuthenticationChallenge): Corrected an slightly misleading explanation.
+
+        * platform/network/mac/AuthenticationMac.mm:
+        (WebCore::AuthenticationChallenge::setAuthenticationClient): Don't create a dummy
+        m_nsChallenge object in place of a nil one.
+
 2013-01-17  Tony Gentilcore  <to...@chromium.org>
 
         Remove unused finishWasCalled() method

Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp (140036 => 140037)


--- trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp	2013-01-17 21:37:18 UTC (rev 140036)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp	2013-01-17 21:50:50 UTC (rev 140037)
@@ -94,7 +94,9 @@
 }
 
 CFURLAuthChallengeRef createCF(const AuthenticationChallenge& coreChallenge)
-{  
+{
+    // FIXME: Why not cache CFURLAuthChallengeRef in m_cfChallenge? Foundation counterpart does that.
+
     CFURLProtectionSpaceRef protectionSpace = createCF(coreChallenge.protectionSpace());
     CFURLCredentialRef credential = createCF(coreChallenge.proposedCredential());
     

Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationChallenge.h (140036 => 140037)


--- trunk/Source/WebCore/platform/network/cf/AuthenticationChallenge.h	2013-01-17 21:37:18 UTC (rev 140036)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationChallenge.h	2013-01-17 21:50:50 UTC (rev 140037)
@@ -71,11 +71,12 @@
     friend class AuthenticationChallengeBase;
     static bool platformCompare(const AuthenticationChallenge& a, const AuthenticationChallenge& b);
 
+    // Platform challenge may be null. If it's non-null, it's always up to date with other fields.
 #if USE(CFNETWORK)
     RefPtr<AuthenticationClient> m_authenticationClient;
     RetainPtr<CFURLAuthChallengeRef> m_cfChallenge;
 #else
-    RetainPtr<id> m_sender; // Always the same as [m_macChallenge.get() sender], cached here for performance.
+    RetainPtr<id> m_sender;
     RetainPtr<NSURLAuthenticationChallenge *> m_nsChallenge;
 #endif
 };

Modified: trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm (140036 => 140037)


--- trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm	2013-01-17 21:37:18 UTC (rev 140036)
+++ trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm	2013-01-17 21:50:50 UTC (rev 140037)
@@ -207,7 +207,8 @@
 {
     if (client) {
         m_sender.adoptNS([[WebCoreAuthenticationClientAsChallengeSender alloc] initWithAuthenticationClient:client]);
-        m_nsChallenge.adoptNS([[NSURLAuthenticationChallenge alloc] initWithAuthenticationChallenge:m_nsChallenge.get() sender:m_sender.get()]);
+        if (m_nsChallenge)
+            m_nsChallenge.adoptNS([[NSURLAuthenticationChallenge alloc] initWithAuthenticationChallenge:m_nsChallenge.get() sender:m_sender.get()]);
     } else {
         if ([m_sender.get() isMemberOfClass:[WebCoreAuthenticationClientAsChallengeSender class]])
             [(WebCoreAuthenticationClientAsChallengeSender *)m_sender.get() detachClient];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to