Title: [285726] trunk/Source
Revision
285726
Author
cdu...@apple.com
Date
2021-11-12 08:53:57 -0800 (Fri, 12 Nov 2021)

Log Message

Unreviewed, partial revert of r285565 to resolve a PLT5 regression.
<rdar://85269156>

Source/WebKit:

* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
(WebKit::NetworkSessionCocoa::isolatedSession):
(WebKit::SessionSet::isolatedSession):
(WebKit::NetworkSessionCocoa::hasIsolatedSession const):
(WebKit::NetworkSessionCocoa::clearIsolatedSessions):
(WebKit::NetworkSessionCocoa::invalidateAndCancelSessionSet):

Source/WTF:

* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (285725 => 285726)


--- trunk/Source/WTF/ChangeLog	2021-11-12 16:52:20 UTC (rev 285725)
+++ trunk/Source/WTF/ChangeLog	2021-11-12 16:53:57 UTC (rev 285726)
@@ -1,3 +1,10 @@
+2021-11-12  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, partial revert of r285565 to resolve a PLT5 regression.
+        <rdar://85269156>
+
+        * wtf/PlatformHave.h:
+
 2021-11-11  Michael Saboff  <msab...@apple.com>
 
         Inline RegExp.test JIT code in DFG and FTL

Modified: trunk/Source/WTF/wtf/PlatformHave.h (285725 => 285726)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-11-12 16:52:20 UTC (rev 285725)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-11-12 16:53:57 UTC (rev 285726)
@@ -958,7 +958,6 @@
     || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
 #define HAVE_CFNETWORK_NSURLSESSION_ATTRIBUTED_BUNDLE_IDENTIFIER 1
 #define HAVE_CFNETWORK_NSURLSESSION_HSTS_WITH_UNTRUSTED_ROOT 1
-#define HAVE_CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN 1
 #define HAVE_AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN 1
 #define HAVE_IMAGE_RESTRICTED_DECODING 1
 #define HAVE_XPC_CONNECTION_COPY_INVALIDATION_REASON 1

Modified: trunk/Source/WebKit/ChangeLog (285725 => 285726)


--- trunk/Source/WebKit/ChangeLog	2021-11-12 16:52:20 UTC (rev 285725)
+++ trunk/Source/WebKit/ChangeLog	2021-11-12 16:53:57 UTC (rev 285726)
@@ -1,3 +1,17 @@
+2021-11-12  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, partial revert of r285565 to resolve a PLT5 regression.
+        <rdar://85269156>
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.h:
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (WebKit::NetworkSessionCocoa::sessionWrapperForTask):
+        (WebKit::NetworkSessionCocoa::isolatedSession):
+        (WebKit::SessionSet::isolatedSession):
+        (WebKit::NetworkSessionCocoa::hasIsolatedSession const):
+        (WebKit::NetworkSessionCocoa::clearIsolatedSessions):
+        (WebKit::NetworkSessionCocoa::invalidateAndCancelSessionSet):
+
 2021-11-12  Adrian Perez de Castro  <ape...@igalia.com>
 
         Some C++ source files use #pragma once

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h (285725 => 285726)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h	2021-11-12 16:52:20 UTC (rev 285725)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h	2021-11-12 16:53:57 UTC (rev 285726)
@@ -81,10 +81,8 @@
 
     SessionWrapper& initializeEphemeralStatelessSessionIfNeeded(NavigatingToAppBoundDomain, NetworkSessionCocoa&);
 
-#if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN)
     SessionWrapper& isolatedSession(WebCore::StoredCredentialsPolicy, const WebCore::RegistrableDomain&, NavigatingToAppBoundDomain, NetworkSessionCocoa&);
     HashMap<WebCore::RegistrableDomain, std::unique_ptr<IsolatedSession>> isolatedSessions;
-#endif
 
     std::unique_ptr<IsolatedSession> appBoundSession;
 

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (285725 => 285726)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2021-11-12 16:52:20 UTC (rev 285725)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2021-11-12 16:53:57 UTC (rev 285726)
@@ -1419,8 +1419,8 @@
     auto shouldBeConsideredAppBound = isNavigatingToAppBoundDomain ? *isNavigatingToAppBoundDomain : NavigatingToAppBoundDomain::Yes;
     if (isParentProcessAFullWebBrowser(networkProcess()))
         shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No;
-    // This ITP partitioning is unnecessary on newer platforms since CFNetwork already has full partioning based on first-party domains.
-#if ENABLE(INTELLIGENT_TRACKING_PREVENTION) && !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN)
+
+#if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
     if (auto* storageSession = networkStorageSession()) {
         auto firstParty = WebCore::RegistrableDomain(request.firstPartyForCookies());
         if (storageSession->shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor(firstParty))
@@ -1493,14 +1493,11 @@
 }
 #endif
 
-#if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN)
 SessionWrapper& NetworkSessionCocoa::isolatedSession(WebPageProxyIdentifier webPageProxyID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, const WebCore::RegistrableDomain& firstPartyDomain, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain)
 {
     return sessionSetForPage(webPageProxyID).isolatedSession(storedCredentialsPolicy, firstPartyDomain, isNavigatingToAppBoundDomain, *this);
 }
-#endif
 
-#if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN)
 SessionWrapper& SessionSet::isolatedSession(WebCore::StoredCredentialsPolicy storedCredentialsPolicy, const WebCore::RegistrableDomain& firstPartyDomain, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain, NetworkSessionCocoa& session)
 {
     auto& entry = isolatedSessions.ensure(firstPartyDomain, [this, &session, isNavigatingToAppBoundDomain] {
@@ -1543,15 +1540,9 @@
 
     return sessionWrapper;
 }
-#endif
 
-
 bool NetworkSessionCocoa::hasIsolatedSession(const WebCore::RegistrableDomain& domain) const
 {
-#if HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN)
-    UNUSED_PARAM(domain);
-    return true;
-#else
     if (m_defaultSessionSet->isolatedSessions.contains(domain))
         return true;
     for (auto& sessionSet : m_perPageSessionSets.values()) {
@@ -1560,16 +1551,13 @@
     }
     
     return false;
-#endif
 }
 
 void NetworkSessionCocoa::clearIsolatedSessions()
 {
-#if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN)
     m_defaultSessionSet->isolatedSessions.clear();
     for (auto& sessionSet : m_perPageSessionSets.values())
         sessionSet->isolatedSessions.clear();
-#endif
 }
 
 void NetworkSessionCocoa::invalidateAndCancelSessionSet(SessionSet& sessionSet)
@@ -1581,7 +1569,6 @@
     [sessionSet.sessionWithoutCredentialStorage.delegate sessionInvalidated];
     [sessionSet.ephemeralStatelessSession.delegate sessionInvalidated];
 
-#if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN)
     for (auto& session : sessionSet.isolatedSessions.values()) {
         [session->sessionWithCredentialStorage.session invalidateAndCancel];
         [session->sessionWithCredentialStorage.delegate sessionInvalidated];
@@ -1589,7 +1576,6 @@
         [session->sessionWithoutCredentialStorage.delegate sessionInvalidated];
     }
     sessionSet.isolatedSessions.clear();
-#endif
 
     if (sessionSet.appBoundSession) {
         [sessionSet.appBoundSession->sessionWithCredentialStorage.session invalidateAndCancel];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to