Support building WebKit for macOS Mojave using a newer SDK
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 20:30:54 +0000 (20:30 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 20:30:54 +0000 (20:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190431

Reviewed by Andy Estes.

* platform/network/cocoa/CookieCocoa.mm:
(WebCore::coreSameSitePolicy):
(WebCore::nsSameSitePolicy):

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

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

index 88b4c90..aeb7438 100644 (file)
@@ -1,5 +1,16 @@
 2018-10-11  Daniel Bates  <dabates@apple.com>
 
+        Support building WebKit for macOS Mojave using a newer SDK
+        https://bugs.webkit.org/show_bug.cgi?id=190431
+
+        Reviewed by Andy Estes.
+
+        * platform/network/cocoa/CookieCocoa.mm:
+        (WebCore::coreSameSitePolicy):
+        (WebCore::nsSameSitePolicy):
+
+2018-10-11  Daniel Bates  <dabates@apple.com>
+
         [iOS] Add typedef for WebEvent keyboard flags
         https://bugs.webkit.org/show_bug.cgi?id=190435
 
index 688d995..288da48 100644 (file)
@@ -89,10 +89,12 @@ static Cookie::SameSitePolicy coreSameSitePolicy(NSHTTPCookieStringPolicy _Nulla
 {
     if (!policy)
         return Cookie::SameSitePolicy::None;
+    ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
     if ([policy isEqualToString:NSHTTPCookieSameSiteLax])
         return Cookie::SameSitePolicy::Lax;
     if ([policy isEqualToString:NSHTTPCookieSameSiteStrict])
         return Cookie::SameSitePolicy::Strict;
+    ALLOW_NEW_API_WITHOUT_GUARDS_END
     ASSERT_NOT_REACHED();
     return Cookie::SameSitePolicy::None;
 }
@@ -102,10 +104,12 @@ static NSHTTPCookieStringPolicy _Nullable nsSameSitePolicy(Cookie::SameSitePolic
     switch (policy) {
     case Cookie::SameSitePolicy::None:
         return nil;
+    ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
     case Cookie::SameSitePolicy::Lax:
         return NSHTTPCookieSameSiteLax;
     case Cookie::SameSitePolicy::Strict:
         return NSHTTPCookieSameSiteStrict;
+    ALLOW_NEW_API_WITHOUT_GUARDS_END
     }
 }
 #endif
@@ -125,8 +129,10 @@ Cookie::Cookie(NSHTTPCookie *cookie)
     , ports { portVectorFromList(cookie.portList) }
 {
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
+    ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
     if ([cookie respondsToSelector:@selector(sameSitePolicy)])
         sameSite = coreSameSitePolicy(cookie.sameSitePolicy);
+    ALLOW_NEW_API_WITHOUT_GUARDS_END
 #endif
 }