Title: [250148] trunk/Source/WebKit
Revision
250148
Author
achristen...@apple.com
Date
2019-09-20 13:36:57 -0700 (Fri, 20 Sep 2019)

Log Message

Introduce LegacyGlobalSettings for settings the NetworkProcess needs from a WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=201970

Reviewed by Geoff Garen.

I'm starting by moving the cache model to this new abstraction.
We were using it in tests to disable the page cache, which should be done with a boolean on the pool configuration, not by changing the cache model.
We were also using it in WKContextSetCacheModel which has several clients that won't change quickly, so this abstraction is used to maintain existing behavior.
I need this so I can make a NetworkProcess not depend on anything from a WebProcessPool when starting.

* Sources.txt:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetCacheModel):
(WKContextGetCacheModel):
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration pageCacheEnabled]):
(-[_WKProcessPoolConfiguration setPageCacheEnabled:]):
* UIProcess/LegacyGlobalSettings.cpp: Added.
(WebKit::LegacyGlobalSettings::singleton):
(WebKit::LegacyGlobalSettings::setCacheModel):
* UIProcess/LegacyGlobalSettings.h: Added.
(WebKit::LegacyGlobalSettings::cacheModel const):
* UIProcess/WebProcessCache.cpp:
(WebKit::WebProcessCache::updateCapacity):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::updateMaxSuspendedPageCount):
(WebKit::WebProcessPool::setCacheModel):
* UIProcess/WebProcessPool.h:
* WebKit.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (250147 => 250148)


--- trunk/Source/WebKit/ChangeLog	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/ChangeLog	2019-09-20 20:36:57 UTC (rev 250148)
@@ -1,5 +1,42 @@
 2019-09-20  Alex Christensen  <achristen...@webkit.org>
 
+        Introduce LegacyGlobalSettings for settings the NetworkProcess needs from a WebProcessPool
+        https://bugs.webkit.org/show_bug.cgi?id=201970
+
+        Reviewed by Geoff Garen.
+
+        I'm starting by moving the cache model to this new abstraction.
+        We were using it in tests to disable the page cache, which should be done with a boolean on the pool configuration, not by changing the cache model.
+        We were also using it in WKContextSetCacheModel which has several clients that won't change quickly, so this abstraction is used to maintain existing behavior.
+        I need this so I can make a NetworkProcess not depend on anything from a WebProcessPool when starting.
+
+        * Sources.txt:
+        * UIProcess/API/APIProcessPoolConfiguration.cpp:
+        (API::ProcessPoolConfiguration::copy):
+        * UIProcess/API/APIProcessPoolConfiguration.h:
+        * UIProcess/API/C/WKContext.cpp:
+        (WKContextSetCacheModel):
+        (WKContextGetCacheModel):
+        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
+        (-[_WKProcessPoolConfiguration pageCacheEnabled]):
+        (-[_WKProcessPoolConfiguration setPageCacheEnabled:]):
+        * UIProcess/LegacyGlobalSettings.cpp: Added.
+        (WebKit::LegacyGlobalSettings::singleton):
+        (WebKit::LegacyGlobalSettings::setCacheModel):
+        * UIProcess/LegacyGlobalSettings.h: Added.
+        (WebKit::LegacyGlobalSettings::cacheModel const):
+        * UIProcess/WebProcessCache.cpp:
+        (WebKit::WebProcessCache::updateCapacity):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::ensureNetworkProcess):
+        (WebKit::WebProcessPool::initializeNewWebProcess):
+        (WebKit::WebProcessPool::updateMaxSuspendedPageCount):
+        (WebKit::WebProcessPool::setCacheModel):
+        * UIProcess/WebProcessPool.h:
+        * WebKit.xcodeproj/project.pbxproj:
+
+2019-09-20  Alex Christensen  <achristen...@webkit.org>
+
         Deprecate unused C API aliases for WebsiteDataStore
         https://bugs.webkit.org/show_bug.cgi?id=202029
 

Modified: trunk/Source/WebKit/Sources.txt (250147 => 250148)


--- trunk/Source/WebKit/Sources.txt	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/Sources.txt	2019-09-20 20:36:57 UTC (rev 250148)
@@ -244,6 +244,7 @@
 UIProcess/GeolocationPermissionRequestManagerProxy.cpp
 UIProcess/GeolocationPermissionRequestProxy.cpp
 UIProcess/InspectorTargetProxy.cpp
+UIProcess/LegacyGlobalSettings.cpp
 UIProcess/PageLoadState.cpp
 UIProcess/ProcessAssertion.cpp
 UIProcess/ProcessThrottler.cpp

Modified: trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp	2019-09-20 20:36:57 UTC (rev 250148)
@@ -44,7 +44,6 @@
 {
     auto copy = this->create();
 
-    copy->m_cacheModel = this->m_cacheModel;
     copy->m_diskCacheSpeculativeValidationEnabled = this->m_diskCacheSpeculativeValidationEnabled;
     copy->m_injectedBundlePath = this->m_injectedBundlePath;
     copy->m_customClassesForParameterCoder = this->m_customClassesForParameterCoder;
@@ -72,6 +71,7 @@
     copy->m_processSwapsOnWindowOpenWithOpener = this->m_processSwapsOnWindowOpenWithOpener;
     copy->m_isAutomaticProcessWarmingEnabledByClient = this->m_isAutomaticProcessWarmingEnabledByClient;
     copy->m_usesWebProcessCache = this->m_usesWebProcessCache;
+    copy->m_usesPageCache = this->m_usesPageCache;
 #if PLATFORM(COCOA)
     copy->m_suppressesConnectionTerminationOnSystemChange = this->m_suppressesConnectionTerminationOnSystemChange;
 #endif

Modified: trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h	2019-09-20 20:36:57 UTC (rev 250148)
@@ -74,8 +74,8 @@
     bool diskCacheSpeculativeValidationEnabled() const { return m_diskCacheSpeculativeValidationEnabled; }
     void setDiskCacheSpeculativeValidationEnabled(bool enabled) { m_diskCacheSpeculativeValidationEnabled = enabled; }
 
-    WebKit::CacheModel cacheModel() const { return m_cacheModel; }
-    void setCacheModel(WebKit::CacheModel cacheModel) { m_cacheModel = cacheModel; }
+    void setUsesPageCache(bool value) { m_usesPageCache = value; }
+    bool usesPageCache() const { return m_usesPageCache; }
 
     const WTF::String& injectedBundlePath() const { return m_injectedBundlePath; }
     void setInjectedBundlePath(const WTF::String& injectedBundlePath) { m_injectedBundlePath = injectedBundlePath; }
@@ -158,7 +158,6 @@
 
 private:
     bool m_diskCacheSpeculativeValidationEnabled { false };
-    WebKit::CacheModel m_cacheModel { WebKit::CacheModel::PrimaryWebBrowser };
 
     WTF::String m_injectedBundlePath;
     Vector<WTF::String> m_customClassesForParameterCoder;
@@ -181,6 +180,7 @@
     bool m_processSwapsOnWindowOpenWithOpener { false };
     Optional<bool> m_isAutomaticProcessWarmingEnabledByClient;
     bool m_usesWebProcessCache { false };
+    bool m_usesPageCache { true };
     bool m_clientWouldBenefitFromAutomaticProcessPrewarming { false };
     WTF::String m_customWebContentServiceBundleIdentifier;
     bool m_shouldConfigureJSCForTesting { false };

Modified: trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp	2019-09-20 20:36:57 UTC (rev 250148)
@@ -35,6 +35,7 @@
 #include "APIURLRequest.h"
 #include "AuthenticationChallengeProxy.h"
 #include "DownloadProxy.h"
+#include "LegacyGlobalSettings.h"
 #include "WKAPICast.h"
 #include "WKArray.h"
 #include "WKContextConfigurationRef.h"
@@ -320,12 +321,12 @@
 
 void WKContextSetCacheModel(WKContextRef contextRef, WKCacheModel cacheModel)
 {
-    WebKit::toImpl(contextRef)->setCacheModel(WebKit::toCacheModel(cacheModel));
+    LegacyGlobalSettings::singleton().setCacheModel(WebKit::toCacheModel(cacheModel));
 }
 
 WKCacheModel WKContextGetCacheModel(WKContextRef contextRef)
 {
-    return WebKit::toAPI(WebKit::toImpl(contextRef)->cacheModel());
+    return WebKit::toAPI(LegacyGlobalSettings::singleton().cacheModel());
 }
 
 void WKContextSetMaximumNumberOfProcesses(WKContextRef, unsigned)

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm	2019-09-20 20:36:57 UTC (rev 250148)
@@ -26,6 +26,7 @@
 #import "config.h"
 #import "_WKProcessPoolConfigurationInternal.h"
 
+#import "LegacyGlobalSettings.h"
 #import <objc/runtime.h>
 #import <wtf/RetainPtr.h>
 
@@ -313,15 +314,12 @@
 
 - (BOOL)pageCacheEnabled
 {
-    return _processPoolConfiguration->cacheModel() != WebKit::CacheModel::DocumentViewer;
+    return _processPoolConfiguration->usesPageCache();
 }
 
 - (void)setPageCacheEnabled:(BOOL)enabled
 {
-    if (!enabled)
-        _processPoolConfiguration->setCacheModel(WebKit::CacheModel::DocumentViewer);
-    else if (![self pageCacheEnabled])
-        _processPoolConfiguration->setCacheModel(WebKit::CacheModel::PrimaryWebBrowser);
+    return _processPoolConfiguration->setUsesPageCache(enabled);
 }
 
 - (BOOL)usesSingleWebProcess

Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp	2019-09-20 20:36:57 UTC (rev 250148)
@@ -27,6 +27,7 @@
 #include "APIPageConfiguration.h"
 #include "APIProcessPoolConfiguration.h"
 #include "APIString.h"
+#include "LegacyGlobalSettings.h"
 #include "TextChecker.h"
 #include "TextCheckerState.h"
 #include "WebAutomationSession.h"
@@ -690,12 +691,10 @@
  * specifying %WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. The default value is
  * %WEBKIT_CACHE_MODEL_WEB_BROWSER.
  */
-void webkit_web_context_set_cache_model(WebKitWebContext* context, WebKitCacheModel model)
+void webkit_web_context_set_cache_model(WebKitWebContext*, WebKitCacheModel model)
 {
     CacheModel cacheModel;
 
-    g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
-
     switch (model) {
     case WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER:
         cacheModel = CacheModel::DocumentViewer;
@@ -710,8 +709,8 @@
         g_assert_not_reached();
     }
 
-    if (cacheModel != context->priv->processPool->cacheModel())
-        context->priv->processPool->setCacheModel(cacheModel);
+    if (cacheModel != LegacyGlobalSettings::singleton().cacheModel())
+        LegacyGlobalSettings::singleton().setCacheModel(cacheModel);
 }
 
 /**
@@ -728,7 +727,7 @@
 {
     g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), WEBKIT_CACHE_MODEL_WEB_BROWSER);
 
-    switch (context->priv->processPool->cacheModel()) {
+    switch (LegacyGlobalSettings::singleton().cacheModel()) {
     case CacheModel::DocumentViewer:
         return WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER;
     case CacheModel::PrimaryWebBrowser:

Added: trunk/Source/WebKit/UIProcess/LegacyGlobalSettings.cpp (0 => 250148)


--- trunk/Source/WebKit/UIProcess/LegacyGlobalSettings.cpp	                        (rev 0)
+++ trunk/Source/WebKit/UIProcess/LegacyGlobalSettings.cpp	2019-09-20 20:36:57 UTC (rev 250148)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LegacyGlobalSettings.h"
+
+#include "WebProcessPool.h"
+#include <wtf/NeverDestroyed.h>
+
+namespace WebKit {
+
+LegacyGlobalSettings::LegacyGlobalSettings() = default;
+
+LegacyGlobalSettings& LegacyGlobalSettings::singleton()
+{
+    static NeverDestroyed<LegacyGlobalSettings> properties;
+    return properties.get();
+}
+
+void LegacyGlobalSettings::setCacheModel(CacheModel cacheModel)
+{
+    m_cacheModel = cacheModel;
+    for (auto processPool : WebProcessPool::allProcessPools())
+        processPool->setCacheModel(cacheModel);
+}
+
+} // namespace WebKit

Added: trunk/Source/WebKit/UIProcess/LegacyGlobalSettings.h (0 => 250148)


--- trunk/Source/WebKit/UIProcess/LegacyGlobalSettings.h	                        (rev 0)
+++ trunk/Source/WebKit/UIProcess/LegacyGlobalSettings.h	2019-09-20 20:36:57 UTC (rev 250148)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CacheModel.h"
+#include <wtf/Forward.h>
+
+namespace WebKit {
+
+class LegacyGlobalSettings {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static LegacyGlobalSettings& singleton();
+    
+    void setCacheModel(CacheModel);
+    CacheModel cacheModel() const { return m_cacheModel; }
+    
+private:
+    friend class NeverDestroyed<LegacyGlobalSettings>;
+    LegacyGlobalSettings();
+    
+    CacheModel m_cacheModel { CacheModel::PrimaryWebBrowser };
+};
+
+} // namespace WebKit

Modified: trunk/Source/WebKit/UIProcess/WebProcessCache.cpp (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/WebProcessCache.cpp	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/WebProcessCache.cpp	2019-09-20 20:36:57 UTC (rev 250148)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "WebProcessCache.h"
 
+#include "LegacyGlobalSettings.h"
 #include "Logging.h"
 #include "WebProcessPool.h"
 #include "WebProcessProxy.h"
@@ -150,7 +151,7 @@
 
 void WebProcessCache::updateCapacity(WebProcessPool& processPool)
 {
-    if (!processPool.configuration().processSwapsOnNavigation() || !processPool.configuration().usesWebProcessCache() || processPool.cacheModel() != CacheModel::PrimaryWebBrowser) {
+    if (!processPool.configuration().processSwapsOnNavigation() || !processPool.configuration().usesWebProcessCache() || LegacyGlobalSettings::singleton().cacheModel() != CacheModel::PrimaryWebBrowser) {
         if (!processPool.configuration().processSwapsOnNavigation())
             RELEASE_LOG(ProcessSwapping, "%p - WebProcessCache::updateCapacity: Cache is disabled because process swap on navigation is disabled", this);
         else if (!processPool.configuration().usesWebProcessCache())

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2019-09-20 20:36:57 UTC (rev 250148)
@@ -492,7 +492,7 @@
         m_websiteDataStore->websiteDataStore().networkingHasBegun();
     }
 
-    parameters.cacheModel = cacheModel();
+    parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel();
     parameters.canHandleHTTPSServerTrustEvaluation = m_canHandleHTTPSServerTrustEvaluation;
 
     for (auto& scheme : globalURLSchemesWithCustomProtocolHandlers())
@@ -919,7 +919,7 @@
     setJavaScriptConfigurationFileEnabledFromDefaults();
 #endif
 
-    parameters.cacheModel = cacheModel();
+    parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel();
     parameters.languages = configuration().overrideLanguages().isEmpty() ? userPreferredLanguages() : configuration().overrideLanguages();
 
     parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument);
@@ -1575,10 +1575,13 @@
 
 void WebProcessPool::updateMaxSuspendedPageCount()
 {
+    if (!m_configuration->usesPageCache())
+        return;
+
     unsigned dummy = 0;
     Seconds dummyInterval;
     unsigned pageCacheSize = 0;
-    calculateMemoryCacheSizes(m_configuration->cacheModel(), dummy, dummy, dummy, dummyInterval, pageCacheSize);
+    calculateMemoryCacheSizes(LegacyGlobalSettings::singleton().cacheModel(), dummy, dummy, dummy, dummyInterval, pageCacheSize);
 
     m_maxSuspendedPageCount = pageCacheSize;
 
@@ -1588,7 +1591,6 @@
 
 void WebProcessPool::setCacheModel(CacheModel cacheModel)
 {
-    m_configuration->setCacheModel(cacheModel);
     updateMaxSuspendedPageCount();
 
     sendToAllProcesses(Messages::WebProcess::SetCacheModel(cacheModel));

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.h	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h	2019-09-20 20:36:57 UTC (rev 250148)
@@ -281,7 +281,6 @@
     VisitedLinkStore& visitedLinkStore() { return m_visitedLinkStore.get(); }
 
     void setCacheModel(CacheModel);
-    CacheModel cacheModel() const { return m_configuration->cacheModel(); }
 
     void setDefaultRequestTimeoutInterval(double);
 

Modified: trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp (250147 => 250148)


--- trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp	2019-09-20 20:36:57 UTC (rev 250148)
@@ -28,6 +28,7 @@
 #include "config.h"
 #include "WebProcessPool.h"
 
+#include "LegacyGlobalSettings.h"
 #include "WebMemoryPressureHandler.h"
 #include "WebProcessCreationParameters.h"
 #include <_javascript_Core/RemoteInspectorServer.h>
@@ -125,7 +126,7 @@
     }
 #endif
 
-    parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModel::DocumentViewer;
+    parameters.memoryCacheDisabled = m_memoryCacheDisabled || LegacyGlobalSettings::singleton().cacheModel() == CacheModel::DocumentViewer;
     parameters.proxySettings = m_networkProxySettings;
 
     if (memoryPressureMonitorDisabled())

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (250147 => 250148)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-09-20 20:30:33 UTC (rev 250147)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-09-20 20:36:57 UTC (rev 250148)
@@ -1725,6 +1725,8 @@
 			compilerSpec = com.apple.compilers.proxy.script;
 			filePatterns = "*.h";
 			fileType = pattern.proxy;
+			inputFiles = (
+			);
 			isEditable = 1;
 			outputFiles = (
 				"$(HEADER_OUTPUT_DIR)/$(INPUT_FILE_NAME)",
@@ -3694,6 +3696,8 @@
 		5CE9120B2293C1E0005BEC78 /* WKMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMain.h; sourceTree = "<group>"; };
 		5CE9120C2293C1E0005BEC78 /* WKMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKMain.mm; sourceTree = "<group>"; };
 		5CE9120F2293C25F005BEC78 /* AuxiliaryProcessMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AuxiliaryProcessMain.cpp; path = Cocoa/AuxiliaryProcessMain.cpp; sourceTree = "<group>"; };
+		5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyGlobalSettings.h; sourceTree = "<group>"; };
+		5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyGlobalSettings.cpp; sourceTree = "<group>"; };
 		5CFECB031E1ED1C800F88504 /* LegacyCustomProtocolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyCustomProtocolManager.cpp; sourceTree = "<group>"; };
 		5DAD73F1116FF90C00EE5396 /* BaseTarget.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = BaseTarget.xcconfig; sourceTree = "<group>"; };
 		617A52D71F43A9B600DCDC0A /* ServiceWorkerClientFetchMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServiceWorkerClientFetchMessageReceiver.cpp; path = DerivedSources/WebKit2/ServiceWorkerClientFetchMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -7755,6 +7759,8 @@
 				839A2F301E2067390039057E /* HighPerformanceGraphicsUsageSampler.h */,
 				A5E391FB2183C1E900C8FB31 /* InspectorTargetProxy.cpp */,
 				A5E391FC2183C1E900C8FB31 /* InspectorTargetProxy.h */,
+				5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */,
+				5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */,
 				31607F3819627002009B87DA /* LegacySessionStateCoding.h */,
 				BC6EDAA5111271C600E7678B /* PageClient.h */,
 				1AC75379183A9FDA0072CB15 /* PageLoadState.cpp */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to