- Revision
- 225694
- Author
- [email protected]
- Date
- 2017-12-08 12:32:20 -0800 (Fri, 08 Dec 2017)
Log Message
Modernize APIWebsiteDataStore.h and WebProcessPool.h
https://bugs.webkit.org/show_bug.cgi?id=180588
Reviewed by Chris Dumez.
pragma once, Ref instead of RefPtr, initializer list in header instead of literals in constructor.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
* UIProcess/WebProcessPool.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (225693 => 225694)
--- trunk/Source/WebKit/ChangeLog 2017-12-08 20:21:27 UTC (rev 225693)
+++ trunk/Source/WebKit/ChangeLog 2017-12-08 20:32:20 UTC (rev 225694)
@@ -1,3 +1,17 @@
+2017-12-08 Alex Christensen <[email protected]>
+
+ Modernize APIWebsiteDataStore.h and WebProcessPool.h
+ https://bugs.webkit.org/show_bug.cgi?id=180588
+
+ Reviewed by Chris Dumez.
+
+ pragma once, Ref instead of RefPtr, initializer list in header instead of literals in constructor.
+
+ * UIProcess/API/APIWebsiteDataStore.h:
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::WebProcessPool):
+ * UIProcess/WebProcessPool.h:
+
2017-12-08 Yusuke Suzuki <[email protected]>
Remove pthread_once in favor of dispatch_once
Modified: trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.h (225693 => 225694)
--- trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.h 2017-12-08 20:21:27 UTC (rev 225693)
+++ trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.h 2017-12-08 20:32:20 UTC (rev 225694)
@@ -23,8 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef APIWebsiteDataStore_h
-#define APIWebsiteDataStore_h
+#pragma once
#include "APIHTTPCookieStore.h"
#include "WebsiteDataStore.h"
@@ -49,7 +48,7 @@
bool resourceLoadStatisticsEnabled() const;
void setResourceLoadStatisticsEnabled(bool);
- WebKit::WebsiteDataStore& websiteDataStore() { return *m_websiteDataStore; }
+ WebKit::WebsiteDataStore& websiteDataStore() { return m_websiteDataStore.get(); }
HTTPCookieStore& httpCookieStore();
static String defaultApplicationCacheDirectory();
@@ -77,10 +76,8 @@
static String cacheDirectoryFileSystemRepresentation(const String& directoryName);
static String websiteDataDirectoryFileSystemRepresentation(const String& directoryName);
- RefPtr<WebKit::WebsiteDataStore> m_websiteDataStore;
+ Ref<WebKit::WebsiteDataStore> m_websiteDataStore;
RefPtr<HTTPCookieStore> m_apiHTTPCookieStore;
};
}
-
-#endif // APIWebsiteDataStore_h
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (225693 => 225694)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2017-12-08 20:21:27 UTC (rev 225693)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2017-12-08 20:32:20 UTC (rev 225694)
@@ -216,8 +216,6 @@
WebProcessPool::WebProcessPool(API::ProcessPoolConfiguration& configuration)
: m_configuration(configuration.copy())
- , m_haveInitialEmptyProcess(false)
- , m_processWithPageCache(0)
, m_defaultPageGroup(WebPageGroup::createNonNull())
, m_injectedBundleClient(std::make_unique<API::InjectedBundleClient>())
, m_automationClient(std::make_unique<API::AutomationClient>())
@@ -225,21 +223,10 @@
, m_historyClient(std::make_unique<API::LegacyContextHistoryClient>())
, m_customProtocolManagerClient(std::make_unique<API::CustomProtocolManagerClient>())
, m_visitedLinkStore(VisitedLinkStore::create())
- , m_visitedLinksPopulated(false)
- , m_plugInAutoStartProvider(this)
- , m_alwaysUsesComplexTextCodePath(false)
- , m_shouldUseFontSmoothing(true)
- , m_memorySamplerEnabled(false)
- , m_memorySamplerInterval(1400.0)
#if PLATFORM(MAC)
, m_highPerformanceGraphicsUsageSampler(std::make_unique<HighPerformanceGraphicsUsageSampler>(*this))
, m_perActivityStateCPUUsageSampler(std::make_unique<PerActivityStateCPUUsageSampler>(*this))
#endif
- , m_shouldUseTestingNetworkSession(false)
- , m_processTerminationEnabled(true)
- , m_canHandleHTTPSServerTrustEvaluation(true)
- , m_didNetworkProcessCrash(false)
- , m_memoryCacheDisabled(false)
, m_alwaysRunsAtBackgroundPriority(m_configuration->alwaysRunsAtBackgroundPriority())
, m_shouldTakeUIBackgroundAssertion(m_configuration->shouldTakeUIBackgroundAssertion())
, m_userObservablePageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (225693 => 225694)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.h 2017-12-08 20:21:27 UTC (rev 225693)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h 2017-12-08 20:32:20 UTC (rev 225694)
@@ -487,9 +487,9 @@
IPC::MessageReceiverMap m_messageReceiverMap;
Vector<RefPtr<WebProcessProxy>> m_processes;
- bool m_haveInitialEmptyProcess;
+ bool m_haveInitialEmptyProcess { false };
- WebProcessProxy* m_processWithPageCache;
+ WebProcessProxy* m_processWithPageCache { nullptr };
#if ENABLE(SERVICE_WORKER)
ServiceWorkerProcessProxy* m_serviceWorkerProcess { nullptr };
bool m_waitingForWorkerContextProcessConnection { false };
@@ -514,9 +514,9 @@
PluginInfoStore m_pluginInfoStore;
#endif
Ref<VisitedLinkStore> m_visitedLinkStore;
- bool m_visitedLinksPopulated;
+ bool m_visitedLinksPopulated { false };
- PlugInAutoStartProvider m_plugInAutoStartProvider;
+ PlugInAutoStartProvider m_plugInAutoStartProvider { this };
HashSet<String> m_schemesToRegisterAsEmptyDocument;
HashSet<String> m_schemesToRegisterAsSecure;
@@ -529,8 +529,8 @@
HashSet<String> m_schemesToRegisterAsAlwaysRevalidated;
HashSet<String> m_schemesToRegisterAsCachePartitioned;
- bool m_alwaysUsesComplexTextCodePath;
- bool m_shouldUseFontSmoothing;
+ bool m_alwaysUsesComplexTextCodePath { false };
+ bool m_shouldUseFontSmoothing { true };
Vector<String> m_fontWhitelist;
@@ -538,8 +538,8 @@
// The client should use initialization messages instead, so that a restarted process would get the same state.
Vector<std::pair<String, RefPtr<API::Object>>> m_messagesToInjectedBundlePostedToEmptyContext;
- bool m_memorySamplerEnabled;
- double m_memorySamplerInterval;
+ bool m_memorySamplerEnabled { false };
+ double m_memorySamplerInterval { 1400.0 };
RefPtr<API::WebsiteDataStore> m_websiteDataStore;
@@ -565,12 +565,12 @@
String m_overrideCookieStorageDirectory;
- bool m_shouldUseTestingNetworkSession;
+ bool m_shouldUseTestingNetworkSession { false };
- bool m_processTerminationEnabled;
+ bool m_processTerminationEnabled { true };
- bool m_canHandleHTTPSServerTrustEvaluation;
- bool m_didNetworkProcessCrash;
+ bool m_canHandleHTTPSServerTrustEvaluation { true };
+ bool m_didNetworkProcessCrash { false };
RefPtr<NetworkProcessProxy> m_networkProcess;
RefPtr<StorageProcessProxy> m_storageProcess;
@@ -581,7 +581,7 @@
bool m_ignoreTLSErrors { true };
#endif
- bool m_memoryCacheDisabled;
+ bool m_memoryCacheDisabled { false };
bool m_resourceLoadStatisticsEnabled { false };
bool m_javaScriptConfigurationFileEnabled { false };
bool m_alwaysRunsAtBackgroundPriority;