Another attempt to fix the Mac and iOS build following r230944
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2018 07:51:30 +0000 (07:51 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2018 07:51:30 +0000 (07:51 +0000)
(https://bugs.webkit.org/show_bug.cgi?id=159464)

* platform/network/mac/CookieJarMac.mm:
(WebCore::policyProperties):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/network/mac/CookieJarMac.mm

index b84e7f9..f5b1e4e 100644 (file)
@@ -1,5 +1,13 @@
 2018-04-24  Daniel Bates  <dabates@apple.com>
 
+        Another attempt to fix the Mac and iOS build following r230944
+        (https://bugs.webkit.org/show_bug.cgi?id=159464)
+
+        * platform/network/mac/CookieJarMac.mm:
+        (WebCore::policyProperties):
+
+2018-04-24  Daniel Bates  <dabates@apple.com>
+
         Attempt to fix the Mac and iOS build following r230944
         (https://bugs.webkit.org/show_bug.cgi?id=159464)
 
index eca2827..8ffbc86 100644 (file)
@@ -73,21 +73,17 @@ static void deleteHTTPCookie(CFHTTPCookieStorageRef cookieStorage, NSHTTPCookie
     CFHTTPCookieStorageDeleteCookie(cookieStorage, [cookie _GetInternalCFHTTPCookie]);
 }
 
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
 static RetainPtr<NSDictionary> policyProperties(const SameSiteInfo& sameSiteInfo, NSURL *url)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
     static NSURL *emptyURL = [[NSURL alloc] initWithString:@""];
     NSDictionary *policyProperties = @{
         @"_kCFHTTPCookiePolicyPropertySiteForCookies": sameSiteInfo.isSameSite ? url : emptyURL,
         @"_kCFHTTPCookiePolicyPropertyIsTopLevelNavigation": [NSNumber numberWithBool:sameSiteInfo.isTopSite],
     };
     return policyProperties;
-#else
-    UNUSED_PARAM(sameSiteInfo);
-    UNUSED_PARAM(url);
-    return nullptr;
-#endif
 }
+#endif
 
 static NSArray *cookiesForURL(NSHTTPCookieStorage *storage, NSURL *url, NSURL *mainDocumentURL, const std::optional<SameSiteInfo>& sameSiteInfo, NSString *partition = nullptr)
 {