Title: [276340] trunk/Source
Revision
276340
Author
[email protected]
Date
2021-04-20 18:05:30 -0700 (Tue, 20 Apr 2021)

Log Message

[Cocoa] Prevent GPU and WebContent processes from attempting to connect to the AppSSO service
https://bugs.webkit.org/show_bug.cgi?id=224834
<rdar://problem/72157514>

Reviewed by Jiewen Tan.

Source/WebCore:

Call version of '_protocolClassForRequest' that tells CFNetwork to ignore AppSSO flows
when building for a platform that supports it.

* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::URLByCanonicalizingURL):

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h: Add declaration for 'skipAppSSO' version of NSURLProtocol method.

Source/WTF:

* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (276339 => 276340)


--- trunk/Source/WTF/ChangeLog	2021-04-21 00:58:51 UTC (rev 276339)
+++ trunk/Source/WTF/ChangeLog	2021-04-21 01:05:30 UTC (rev 276340)
@@ -1,3 +1,13 @@
+2021-04-20  Brent Fulgham  <[email protected]>
+
+        [Cocoa] Prevent GPU and WebContent processes from attempting to connect to the AppSSO service 
+        https://bugs.webkit.org/show_bug.cgi?id=224834
+        <rdar://problem/72157514>
+
+        Reviewed by Jiewen Tan.
+
+        * wtf/PlatformHave.h:
+
 2021-04-20  Eric Carlson  <[email protected]>
 
         [Cocoa] Enable MediaSession and MediaSessionCoordinator experimental features

Modified: trunk/Source/WTF/wtf/PlatformHave.h (276339 => 276340)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-04-21 00:58:51 UTC (rev 276339)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-04-21 01:05:30 UTC (rev 276340)
@@ -949,3 +949,7 @@
     || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
 #define HAVE_CFNETWORK_NSURLSESSION_ATTRIBUTED_BUNDLE_IDENTIFIER 1
 #endif
+
+#if PLATFORM(IOS) || PLATFORM(MACCATALYST) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
+#define HAVE_NSURLPROTOCOL_WITH_SKIPAPPSSO 1
+#endif

Modified: trunk/Source/WebCore/ChangeLog (276339 => 276340)


--- trunk/Source/WebCore/ChangeLog	2021-04-21 00:58:51 UTC (rev 276339)
+++ trunk/Source/WebCore/ChangeLog	2021-04-21 01:05:30 UTC (rev 276340)
@@ -1,3 +1,17 @@
+2021-04-20  Brent Fulgham  <[email protected]>
+
+        [Cocoa] Prevent GPU and WebContent processes from attempting to connect to the AppSSO service 
+        https://bugs.webkit.org/show_bug.cgi?id=224834
+        <rdar://problem/72157514>
+
+        Reviewed by Jiewen Tan.
+
+        Call version of '_protocolClassForRequest' that tells CFNetwork to ignore AppSSO flows
+        when building for a platform that supports it.
+
+        * platform/mac/WebCoreNSURLExtras.mm:
+        (WebCore::URLByCanonicalizingURL):
+
 2021-04-20  Devin Rousso  <[email protected]>
 
         Parse `theme_color` in web application manifests and pass it along to `-[WKWebView themeColor]`

Modified: trunk/Source/WebCore/PAL/ChangeLog (276339 => 276340)


--- trunk/Source/WebCore/PAL/ChangeLog	2021-04-21 00:58:51 UTC (rev 276339)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-04-21 01:05:30 UTC (rev 276340)
@@ -1,3 +1,13 @@
+2021-04-20  Brent Fulgham  <[email protected]>
+
+        [Cocoa] Prevent GPU and WebContent processes from attempting to connect to the AppSSO service 
+        https://bugs.webkit.org/show_bug.cgi?id=224834
+        <rdar://problem/72157514>
+
+        Reviewed by Jiewen Tan.
+
+        * pal/spi/cf/CFNetworkSPI.h: Add declaration for 'skipAppSSO' version of NSURLProtocol method.
+
 2021-04-19  Kimmo Kinnunen  <[email protected]>
 
         Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards

Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (276339 => 276340)


--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2021-04-21 00:58:51 UTC (rev 276339)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2021-04-21 01:05:30 UTC (rev 276340)
@@ -50,6 +50,14 @@
 #import <CFNetwork/CFNSURLConnection.h>
 #endif
 
+#if HAVE(NSURLPROTOCOL_WITH_SKIPAPPSSO)
+#if defined(__OBJC__)
+@interface NSURLProtocol (NSURLConnectionAppSSOPrivate)
++ (Class)_protocolClassForRequest:(NSURLRequest *)request skipAppSSO:(BOOL)skipAppSSO;
+@end
+#endif
+#endif
+
 #else // !USE(APPLE_INTERNAL_SDK)
 
 #if HAVE(PRECONNECT_PING) && defined(__OBJC__)
@@ -166,6 +174,12 @@
 + (Class)_protocolClassForRequest:(NSURLRequest *)request;
 @end
 
+#if HAVE(NSURLPROTOCOL_WITH_SKIPAPPSSO)
+@interface NSURLProtocol (NSURLConnectionAppSSOPrivate)
++ (Class)_protocolClassForRequest:(NSURLRequest *)request skipAppSSO:(BOOL)skipAppSSO;
+@end
+#endif
+
 @interface NSURLRequest ()
 + (NSArray *)allowsSpecificHTTPSCertificateForHost:(NSString *)host;
 + (void)setAllowsSpecificHTTPSCertificate:(NSArray *)allow forHost:(NSString *)host;

Modified: trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (276339 => 276340)


--- trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm	2021-04-21 00:58:51 UTC (rev 276339)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm	2021-04-21 01:05:30 UTC (rev 276340)
@@ -42,7 +42,11 @@
 NSURL *URLByCanonicalizingURL(NSURL *URL)
 {
     RetainPtr<NSURLRequest> request = adoptNS([[NSURLRequest alloc] initWithURL:URL]);
+#if HAVE(NSURLPROTOCOL_WITH_SKIPAPPSSO)
+    Class concreteClass = [NSURLProtocol _protocolClassForRequest:request.get() skipAppSSO:YES];
+#else
     Class concreteClass = [NSURLProtocol _protocolClassForRequest:request.get()];
+#endif
     if (!concreteClass) {
         return URL;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to