ASSERT(m_nsResponse) in ResourceResponse::platformCertificateInfo() when running...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Dec 2015 20:46:47 +0000 (20:46 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Dec 2015 20:46:47 +0000 (20:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152559

Reviewed by Andy Estes.

Fix a regression from r194378.

* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194420 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm

index ae965b0..f90f30b 100644 (file)
@@ -1,3 +1,15 @@
+2015-12-25  Alexey Proskuryakov  <ap@apple.com>
+
+        ASSERT(m_nsResponse) in ResourceResponse::platformCertificateInfo() when running tests in iOS simulator
+        https://bugs.webkit.org/show_bug.cgi?id=152559
+
+        Reviewed by Andy Estes.
+
+        Fix a regression from r194378.
+
+        * platform/network/cocoa/ResourceResponseCocoa.mm:
+        (WebCore::ResourceResponse::platformCertificateInfo):
+
 2015-12-25  David Kilzer  <ddkilzer@apple.com>
 
         ResourceError should store failingURL as URL instead of String to avoid reparsing and to address FIXME comments in ResourceErrorCF.cpp and ResourceErrorMac.mm
index 1d79cdc..a6eda5c 100644 (file)
@@ -67,8 +67,14 @@ void ResourceResponse::initNSURLResponse() const
 
 CertificateInfo ResourceResponse::platformCertificateInfo() const
 {
+#if USE(CFNETWORK)
+    ASSERT(m_cfResponse);
+    CFURLResponseRef cfResponse = m_cfResponse.get();
+#else
     ASSERT(m_nsResponse);
-    auto cfResponse = [m_nsResponse _CFURLResponse];
+    CFURLResponseRef cfResponse = [m_nsResponse _CFURLResponse];
+#endif
+
     if (!cfResponse)
         return { };