Title: [235220] trunk/Source/WebKit
Revision
235220
Author
[email protected]
Date
2018-08-23 00:00:08 -0700 (Thu, 23 Aug 2018)

Log Message

NetworkCache::Storage::lastStableVersion should be a developer-only feature
https://bugs.webkit.org/show_bug.cgi?id=188843
<rdar://problem/43574100>

Reviewed by Geoffrey Garen.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::deleteOldVersions):

Delete old cache versions unconditionally if we are system WebKit.

* Shared/ChildProcess.h:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::isSystemWebKit):

Find out if WebKit is installed under '/System/'.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (235219 => 235220)


--- trunk/Source/WebKit/ChangeLog	2018-08-23 06:30:07 UTC (rev 235219)
+++ trunk/Source/WebKit/ChangeLog	2018-08-23 07:00:08 UTC (rev 235220)
@@ -1,3 +1,22 @@
+2018-08-22  Antti Koivisto  <[email protected]>
+
+        NetworkCache::Storage::lastStableVersion should be a developer-only feature
+        https://bugs.webkit.org/show_bug.cgi?id=188843
+        <rdar://problem/43574100>
+
+        Reviewed by Geoffrey Garen.
+
+        * NetworkProcess/cache/NetworkCacheStorage.cpp:
+        (WebKit::NetworkCache::Storage::deleteOldVersions):
+
+        Delete old cache versions unconditionally if we are system WebKit.
+
+        * Shared/ChildProcess.h:
+        * Shared/mac/ChildProcessMac.mm:
+        (WebKit::ChildProcess::isSystemWebKit):
+
+        Find out if WebKit is installed under '/System/'.
+
 2018-08-22  Zan Dobersek  <[email protected]>
 
         [CoordGraphics] Remove CoordinatedImageBacking and related functionality

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp (235219 => 235220)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp	2018-08-23 06:30:07 UTC (rev 235219)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp	2018-08-23 07:00:08 UTC (rev 235220)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "NetworkCacheStorage.h"
 
+#include "ChildProcess.h"
 #include "Logging.h"
 #include "NetworkCacheCoders.h"
 #include "NetworkCacheFileSystem.h"
@@ -1137,7 +1138,7 @@
             if (directoryVersion >= version)
                 return;
 #if PLATFORM(MAC)
-            if (directoryVersion == lastStableVersion)
+            if (!ChildProcess::isSystemWebKit() && directoryVersion == lastStableVersion)
                 return;
 #endif
 

Modified: trunk/Source/WebKit/Shared/ChildProcess.h (235219 => 235220)


--- trunk/Source/WebKit/Shared/ChildProcess.h	2018-08-23 06:30:07 UTC (rev 235219)
+++ trunk/Source/WebKit/Shared/ChildProcess.h	2018-08-23 07:00:08 UTC (rev 235220)
@@ -77,6 +77,10 @@
 
     IPC::MessageReceiverMap& messageReceiverMap() { return m_messageReceiverMap; }
 
+#if PLATFORM(MAC)
+    static bool isSystemWebKit();
+#endif
+
 protected:
     explicit ChildProcess();
     virtual ~ChildProcess();

Modified: trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm (235219 => 235220)


--- trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm	2018-08-23 06:30:07 UTC (rev 235219)
+++ trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm	2018-08-23 07:00:08 UTC (rev 235220)
@@ -732,6 +732,16 @@
     task_policy_set(mach_task_self(), TASK_OVERRIDE_QOS_POLICY, (task_policy_t)&qosinfo, TASK_QOS_POLICY_COUNT);
 }
 
+#if PLATFORM(MAC)
+bool ChildProcess::isSystemWebKit()
+{
+    static bool isSystemWebKit = [] {
+        return [[webKit2Bundle() bundlePath] hasPrefix:@"/System/"];
+    }();
+    return isSystemWebKit;
+}
+#endif
+
 } // namespace WebKit
 
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to