Title: [274491] trunk/Source
Revision
274491
Author
achristen...@apple.com
Date
2021-03-16 10:41:40 -0700 (Tue, 16 Mar 2021)

Log Message

Terminate network process when making new WebProcessPool in Lutron App
https://bugs.webkit.org/show_bug.cgi?id=223194
<rdar://74674915>

Reviewed by Geoff Garen.

Source/WebCore:

* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isLutron):
* platform/cocoa/VersionChecks.h:

Source/WebKit:

The Lutron App uses allocation of a new WKProcessPool as a way to stop using old session cookies.
Since r267763 we keep the session cookies for the lifetime of a WKWebsiteDataStore instead of making a new process for each WKProcessPool.
Add a quirk for this app until they update to use a new WKWebsiteDataStore or use WKHTTPCookieStore API to clear the cookies properly.
I manually verified this causes the logging out to succeed.

* UIProcess/WebProcessPool.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (274490 => 274491)


--- trunk/Source/WebCore/ChangeLog	2021-03-16 17:33:55 UTC (rev 274490)
+++ trunk/Source/WebCore/ChangeLog	2021-03-16 17:41:40 UTC (rev 274491)
@@ -1,3 +1,16 @@
+2021-03-16  Alex Christensen  <achristen...@webkit.org>
+
+        Terminate network process when making new WebProcessPool in Lutron App
+        https://bugs.webkit.org/show_bug.cgi?id=223194
+        <rdar://74674915>
+
+        Reviewed by Geoff Garen.
+
+        * platform/RuntimeApplicationChecks.h:
+        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+        (WebCore::IOSApplication::isLutron):
+        * platform/cocoa/VersionChecks.h:
+
 2021-03-16  Jer Noble  <jer.no...@apple.com>
 
         [Cocoa] YouTube audio stalls occasionally

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (274490 => 274491)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2021-03-16 17:33:55 UTC (rev 274490)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2021-03-16 17:41:40 UTC (rev 274491)
@@ -126,6 +126,7 @@
 WEBCORE_EXPORT bool isPaperIO();
 WEBCORE_EXPORT bool isCrunchyroll();
 bool isWechat();
+WEBCORE_EXPORT bool isLutron();
 
 } // IOSApplication
 

Modified: trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (274490 => 274491)


--- trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2021-03-16 17:33:55 UTC (rev 274490)
+++ trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2021-03-16 17:41:40 UTC (rev 274491)
@@ -434,6 +434,12 @@
     return isWechat;
 }
 
+bool IOSApplication::isLutron()
+{
+    static bool isLutronApp = applicationBundleIsEqualTo("com.lutron.lsb"_s);
+    return isLutronApp;
+}
+
 #endif
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/cocoa/VersionChecks.h (274490 => 274491)


--- trunk/Source/WebCore/platform/cocoa/VersionChecks.h	2021-03-16 17:33:55 UTC (rev 274490)
+++ trunk/Source/WebCore/platform/cocoa/VersionChecks.h	2021-03-16 17:41:40 UTC (rev 274491)
@@ -70,6 +70,7 @@
     FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_IOS_VERSION_15_0,
     FirstWithoutWeChatScrollingQuirk = DYLD_IOS_VERSION_14_5,
     FirstWithDOMWindowReuseRestriction  = DYLD_IOS_VERSION_14_5,
+    FirstWithSharedNetworkProcess = DYLD_IOS_VERSION_14_5,
 #elif PLATFORM(MAC)
     FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
     FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,

Modified: trunk/Source/WebKit/ChangeLog (274490 => 274491)


--- trunk/Source/WebKit/ChangeLog	2021-03-16 17:33:55 UTC (rev 274490)
+++ trunk/Source/WebKit/ChangeLog	2021-03-16 17:41:40 UTC (rev 274491)
@@ -1,3 +1,18 @@
+2021-03-16  Alex Christensen  <achristen...@webkit.org>
+
+        Terminate network process when making new WebProcessPool in Lutron App
+        https://bugs.webkit.org/show_bug.cgi?id=223194
+        <rdar://74674915>
+
+        Reviewed by Geoff Garen.
+
+        The Lutron App uses allocation of a new WKProcessPool as a way to stop using old session cookies.
+        Since r267763 we keep the session cookies for the lifetime of a WKWebsiteDataStore instead of making a new process for each WKProcessPool.
+        Add a quirk for this app until they update to use a new WKWebsiteDataStore or use WKHTTPCookieStore API to clear the cookies properly.
+        I manually verified this causes the logging out to succeed.
+
+        * UIProcess/WebProcessPool.cpp:
+
 2021-03-16  Kate Cheney  <katherine_che...@apple.com>
 
         Add internal additions for WebAuthn compatibility

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (274490 => 274491)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2021-03-16 17:33:55 UTC (rev 274490)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2021-03-16 17:41:40 UTC (rev 274491)
@@ -324,6 +324,15 @@
     });
 
     updateBackForwardCacheCapacity();
+
+#if PLATFORM(IOS)
+    if (WebCore::IOSApplication::isLutron() && !WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithSharedNetworkProcess)) {
+        callOnMainRunLoop([] {
+            if (WebsiteDataStore::defaultDataStoreExists())
+                WebsiteDataStore::defaultDataStore()->terminateNetworkProcess();
+        });
+    }
+#endif
 }
 
 WebProcessPool::~WebProcessPool()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to