Diff
Modified: trunk/Source/WebCore/ChangeLog (240452 => 240453)
--- trunk/Source/WebCore/ChangeLog 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebCore/ChangeLog 2019-01-24 23:41:30 UTC (rev 240453)
@@ -1,3 +1,16 @@
+2019-01-24 Truitt Savell <[email protected]>
+
+ Unreviewed, rolling out r240446.
+
+ Casued 5 API failures
+
+ Reverted changeset:
+
+ "Activate the WebResourceLoadStatisticsStore in the
+ NetworkProcess and deactivate it in the UIProcess."
+ https://bugs.webkit.org/show_bug.cgi?id=193297
+ https://trac.webkit.org/changeset/240446
+
2019-01-24 Wenson Hsieh <[email protected]>
[iOS] Unable to make a selection in jsfiddle.net using arrow keys when requesting desktop site
Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (240452 => 240453)
--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -279,8 +279,8 @@
}
}
- RunLoop::main().dispatch([targetURL = m_url.isolatedCopy(), mainFrameURL = context.url().isolatedCopy(), sessionID = context.sessionID()]() {
- ResourceLoadObserver::shared().logWebSocketLoading(targetURL, mainFrameURL, sessionID);
+ RunLoop::main().dispatch([targetURL = m_url.isolatedCopy(), mainFrameURL = context.url().isolatedCopy(), usesEphemeralSession = context.sessionID().isEphemeral()]() {
+ ResourceLoadObserver::shared().logWebSocketLoading(targetURL, mainFrameURL, usesEphemeralSession);
});
if (is<Document>(context)) {
Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (240452 => 240453)
--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -75,24 +75,6 @@
m_logUserInteractionNotificationCallback = WTFMove(callback);
}
-void ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&& callback)
-{
- ASSERT(!m_logWebSocketLoadingNotificationCallback);
- m_logWebSocketLoadingNotificationCallback = WTFMove(callback);
-}
-
-void ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&& callback)
-{
- ASSERT(!m_logSubresourceLoadingNotificationCallback);
- m_logSubresourceLoadingNotificationCallback = WTFMove(callback);
-}
-
-void ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&)>&& callback)
-{
- ASSERT(!m_logSubresourceRedirectNotificationCallback);
- m_logSubresourceRedirectNotificationCallback = WTFMove(callback);
-}
-
ResourceLoadObserver::ResourceLoadObserver()
: m_notificationTimer(*this, &ResourceLoadObserver::notifyObserver)
{
@@ -140,12 +122,9 @@
bool shouldCallNotificationCallback = false;
{
auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
- auto lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
- targetStatistics.lastSeen = lastSeen;
+ targetStatistics.lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
shouldCallNotificationCallback = true;
-
- m_logSubresourceLoadingNotificationCallback(page->sessionID(), targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
}
if (isRedirect) {
@@ -156,8 +135,6 @@
if (isNewRedirectToEntry || isNewRedirectFromEntry)
shouldCallNotificationCallback = true;
-
- m_logSubresourceRedirectNotificationCallback(page->sessionID(), sourcePrimaryDomain, targetPrimaryDomain);
}
if (shouldCallNotificationCallback)
@@ -164,9 +141,9 @@
scheduleNotificationIfNeeded();
}
-void ResourceLoadObserver::logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, PAL::SessionID sessionID)
+void ResourceLoadObserver::logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, bool usesEphemeralSession)
{
- if (!shouldLog(sessionID.isEphemeral()))
+ if (!shouldLog(usesEphemeralSession))
return;
auto targetHost = targetURL.host();
@@ -181,14 +158,10 @@
if (targetPrimaryDomain == mainFramePrimaryDomain)
return;
- auto lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
-
auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
- targetStatistics.lastSeen = lastSeen;
+ targetStatistics.lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now());
if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
scheduleNotificationIfNeeded();
-
- m_logWebSocketLoadingNotificationCallback(sessionID, targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
}
void ResourceLoadObserver::logUserInteractionWithReducedTimeResolution(const Document& document)
@@ -224,7 +197,8 @@
}
}
- m_logUserInteractionNotificationCallback(document.sessionID(), domain);
+ // FIXME(193297): Uncomment this line when ResourceLoadStatistics are no longer gathered in the UI Process.
+ // m_logUserInteractionNotificationCallback(document.sessionID(), domain);
#endif
m_notificationTimer.stop();
Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.h (240452 => 240453)
--- trunk/Source/WebCore/loader/ResourceLoadObserver.h 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.h 2019-01-24 23:41:30 UTC (rev 240453)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,7 +60,7 @@
WEBCORE_EXPORT static ResourceLoadObserver& shared();
void logSubresourceLoading(const Frame*, const ResourceRequest& newRequest, const ResourceResponse& redirectResponse);
- void logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, PAL::SessionID);
+ void logWebSocketLoading(const URL& targetURL, const URL& mainFrameURL, bool usesEphemeralSession);
void logUserInteractionWithReducedTimeResolution(const Document&);
void logFontLoad(const Document&, const String& familyName, bool loadStatus);
@@ -74,9 +74,6 @@
WEBCORE_EXPORT void setNotificationCallback(WTF::Function<void (Vector<ResourceLoadStatistics>&&)>&&);
WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(const String&, uint64_t, const String&)>&&);
WEBCORE_EXPORT void setLogUserInteractionNotificationCallback(WTF::Function<void(PAL::SessionID, const String&)>&&);
- WEBCORE_EXPORT void setLogWebSocketLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&&);
- WEBCORE_EXPORT void setLogSubresourceLoadingNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&, WallTime)>&&);
- WEBCORE_EXPORT void setLogSubresourceRedirectNotificationCallback(WTF::Function<void(PAL::SessionID, const String&, const String&)>&&);
WEBCORE_EXPORT void notifyObserver();
WEBCORE_EXPORT void clearState();
@@ -101,13 +98,9 @@
HashMap<String, ResourceLoadStatistics> m_resourceStatisticsMap;
HashMap<String, WTF::WallTime> m_lastReportedUserInteractionMap;
- Function<void(Vector<ResourceLoadStatistics>&&)> m_notificationCallback;
- Function<void(const String&, uint64_t, const String&)> m_requestStorageAccessUnderOpenerCallback;
- Function<void(PAL::SessionID, const String&)> m_logUserInteractionNotificationCallback;
- Function<void(PAL::SessionID, const String&, const String&, WallTime)> m_logWebSocketLoadingNotificationCallback;
- Function<void(PAL::SessionID, const String&, const String&, WallTime)> m_logSubresourceLoadingNotificationCallback;
- Function<void(PAL::SessionID, const String&, const String&)> m_logSubresourceRedirectNotificationCallback;
-
+ WTF::Function<void (Vector<ResourceLoadStatistics>&&)> m_notificationCallback;
+ WTF::Function<void(const String&, uint64_t, const String&)> m_requestStorageAccessUnderOpenerCallback;
+ WTF::Function<void(PAL::SessionID, const String&)> m_logUserInteractionNotificationCallback;
Timer m_notificationTimer;
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
uint64_t m_loggingCounter { 0 };
Modified: trunk/Source/WebKit/ChangeLog (240452 => 240453)
--- trunk/Source/WebKit/ChangeLog 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/ChangeLog 2019-01-24 23:41:30 UTC (rev 240453)
@@ -1,3 +1,16 @@
+2019-01-24 Truitt Savell <[email protected]>
+
+ Unreviewed, rolling out r240446.
+
+ Casued 5 API failures
+
+ Reverted changeset:
+
+ "Activate the WebResourceLoadStatisticsStore in the
+ NetworkProcess and deactivate it in the UIProcess."
+ https://bugs.webkit.org/show_bug.cgi?id=193297
+ https://trac.webkit.org/changeset/240446
+
2019-01-24 Brent Fulgham <[email protected]>
Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -638,33 +638,6 @@
scheduleStatisticsProcessingRequestIfNecessary();
}
-void ResourceLoadStatisticsMemoryStore::logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
-{
- auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
- targetStatistics.lastSeen = lastSeen;
- if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
- scheduleStatisticsProcessingRequestIfNecessary();
-}
-
-void ResourceLoadStatisticsMemoryStore::logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
-{
- auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
- targetStatistics.lastSeen = lastSeen;
- if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry)
- scheduleStatisticsProcessingRequestIfNecessary();
-}
-
-void ResourceLoadStatisticsMemoryStore::logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain)
-{
- auto& redirectingOriginStatistics = ensureResourceStatisticsForPrimaryDomain(sourcePrimaryDomain);
- bool isNewRedirectToEntry = redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetPrimaryDomain).isNewEntry;
- auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
- bool isNewRedirectFromEntry = targetStatistics.subresourceUniqueRedirectsFrom.add(sourcePrimaryDomain).isNewEntry;
-
- if (isNewRedirectToEntry || isNewRedirectFromEntry)
- scheduleStatisticsProcessingRequestIfNecessary();
-}
-
void ResourceLoadStatisticsMemoryStore::logUserInteraction(const String& primaryDomain)
{
ASSERT(!RunLoop::isMain());
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h 2019-01-24 23:41:30 UTC (rev 240453)
@@ -124,9 +124,6 @@
void logFrameNavigation(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, const String& sourcePrimaryDomain, const String& targetHost, const String& mainFrameHost, bool isRedirect, bool isMainFrame);
void logUserInteraction(const String& primaryDomain);
- void logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
- void logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
- void logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain);
void clearUserInteraction(const String& primaryDomain);
bool hasHadUserInteraction(const String& primaryDomain);
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -417,6 +417,12 @@
});
}
+void WebResourceLoadStatisticsStore::removeAllStorageAccess()
+{
+ if (m_networkSession)
+ m_networkSession->networkStorageSession().removeAllStorageAccess();
+}
+
void WebResourceLoadStatisticsStore::removeAllStorageAccess(CompletionHandler<void()>&& completionHandler)
{
ASSERT(RunLoop::isMain());
@@ -425,10 +431,7 @@
m_websiteDataStore->removeAllStorageAccessHandler(WTFMove(completionHandler));
return;
}
-
- if (m_networkSession)
- m_networkSession->networkStorageSession().removeAllStorageAccess();
-
+ removeAllStorageAccess();
completionHandler();
}
@@ -501,36 +504,6 @@
});
}
-void WebResourceLoadStatisticsStore::logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
-{
- postTask([this, targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), mainFramePrimaryDomain = mainFramePrimaryDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
- if (m_memoryStore)
- m_memoryStore->logWebSocketLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
-
- postTaskReply(WTFMove(completionHandler));
- });
-}
-
-void WebResourceLoadStatisticsStore::logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
-{
- postTask([this, targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), mainFramePrimaryDomain = mainFramePrimaryDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
- if (m_memoryStore)
- m_memoryStore->logSubresourceLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen);
-
- postTaskReply(WTFMove(completionHandler));
- });
-}
-
-void WebResourceLoadStatisticsStore::logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain, CompletionHandler<void()>&& completionHandler)
-{
- postTask([this, sourcePrimaryDomain = sourcePrimaryDomain.isolatedCopy(), targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
- if (m_memoryStore)
- m_memoryStore->logSubresourceRedirect(sourcePrimaryDomain, targetPrimaryDomain);
-
- postTaskReply(WTFMove(completionHandler));
- });
-}
-
void WebResourceLoadStatisticsStore::logUserInteraction(const URL& url, CompletionHandler<void()>&& completionHandler)
{
ASSERT(RunLoop::isMain());
@@ -1107,6 +1080,12 @@
});
}
+void WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources(Seconds seconds)
+{
+ if (m_networkSession)
+ m_networkSession->networkStorageSession().setCacheMaxAgeCapForPrevalentResources(seconds);
+}
+
void WebResourceLoadStatisticsStore::setCacheMaxAgeCap(Seconds seconds, CompletionHandler<void()>&& completionHandler)
{
ASSERT(RunLoop::isMain());
@@ -1116,10 +1095,7 @@
m_websiteDataStore->setCacheMaxAgeCapForPrevalentResources(seconds, WTFMove(completionHandler));
return;
}
-
- if (m_networkSession)
- m_networkSession->networkStorageSession().setCacheMaxAgeCapForPrevalentResources(seconds);
-
+ setCacheMaxAgeCapForPrevalentResources(seconds);
completionHandler();
}
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h 2019-01-24 23:41:30 UTC (rev 240453)
@@ -91,9 +91,6 @@
void logFrameNavigation(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, const String& sourcePrimaryDomain, const String& targetHost, const String& mainFrameHost, bool isRedirect, bool isMainFrame);
void logUserInteraction(const URL&, CompletionHandler<void()>&&);
void logUserInteraction(const String& targetPrimaryDomain, CompletionHandler<void()>&&);
- void logWebSocketLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&&);
- void logSubresourceLoading(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen, CompletionHandler<void()>&&);
- void logSubresourceRedirect(const String& sourcePrimaryDomain, const String& targetPrimaryDomain, CompletionHandler<void()>&&);
void clearUserInteraction(const URL&, CompletionHandler<void()>&&);
void clearUserInteraction(const String& targetPrimaryDomain, CompletionHandler<void()>&&);
void deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores(OptionSet<WebsiteDataType>, Vector<String>&& topPrivatelyControlledDomains, bool shouldNotifyPage, CompletionHandler<void(const HashSet<String>&)>&&);
@@ -127,7 +124,9 @@
void setGrandfathered(const String&, bool, CompletionHandler<void()>&&);
void isGrandfathered(const URL&, CompletionHandler<void(bool)>&&);
void isGrandfathered(const String&, CompletionHandler<void(bool)>&&);
+ void removeAllStorageAccess();
void removePrevalentDomains(const Vector<String>& domainsToBlock);
+ void setCacheMaxAgeCapForPrevalentResources(Seconds);
void setNotifyPagesWhenDataRecordsWereScanned(bool, CompletionHandler<void()>&&);
void setSubframeUnderTopFrameOrigin(const URL& subframe, const URL& topFrame, CompletionHandler<void()>&&);
void setSubframeUnderTopFrameOrigin(const String& subframe, const String& topFrame, CompletionHandler<void()>&&);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -595,50 +595,6 @@
#endif
}
-void NetworkConnectionToWebProcess::logWebSocketLoading(PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
-{
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
- if (auto networkSession = networkProcess().networkSession(sessionID)) {
- if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
- resourceLoadStatistics->logWebSocketLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen, [] { });
- }
-#else
- UNUSED_PARAM(sessionID);
- UNUSED_PARAM(targetPrimaryDomain);
- UNUSED_PARAM(mainFramePrimaryDomain);
- UNUSED_PARAM(lastSeen);
-#endif
-}
-
-void NetworkConnectionToWebProcess::logSubresourceLoading(PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen)
-{
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
- if (auto networkSession = networkProcess().networkSession(sessionID)) {
- if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
- resourceLoadStatistics->logSubresourceLoading(targetPrimaryDomain, mainFramePrimaryDomain, lastSeen, [] { });
- }
-#else
- UNUSED_PARAM(sessionID);
- UNUSED_PARAM(targetPrimaryDomain);
- UNUSED_PARAM(mainFramePrimaryDomain);
- UNUSED_PARAM(lastSeen);
-#endif
-}
-
-void NetworkConnectionToWebProcess::logSubresourceRedirect(PAL::SessionID sessionID, const String& sourcePrimaryDomain, const String& targetPrimaryDomain)
-{
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
- if (auto networkSession = networkProcess().networkSession(sessionID)) {
- if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
- resourceLoadStatistics->logSubresourceRedirect(sourcePrimaryDomain, targetPrimaryDomain, [] { });
- }
-#else
- UNUSED_PARAM(sessionID);
- UNUSED_PARAM(sourcePrimaryDomain);
- UNUSED_PARAM(targetPrimaryDomain);
-#endif
-}
-
void NetworkConnectionToWebProcess::addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
{
SecurityPolicy::addOriginAccessWhitelistEntry(SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2019-01-24 23:41:30 UTC (rev 240453)
@@ -195,9 +195,6 @@
void removeStorageAccessForFrame(PAL::SessionID, uint64_t frameID, uint64_t pageID);
void removeStorageAccessForAllFramesOnPage(PAL::SessionID, uint64_t pageID);
void logUserInteraction(PAL::SessionID, const String& topLevelOrigin);
- void logWebSocketLoading(PAL::SessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
- void logSubresourceLoading(PAL::SessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen);
- void logSubresourceRedirect(PAL::SessionID, const String& sourcePrimaryDomain, const String& targetPrimaryDomain);
void addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains);
void removeOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2019-01-24 23:41:30 UTC (rev 240453)
@@ -60,9 +60,6 @@
RemoveStorageAccessForAllFramesOnPage(PAL::SessionID sessionID, uint64_t pageID);
#if ENABLE(RESOURCE_LOAD_STATISTICS)
LogUserInteraction(PAL::SessionID sessionID, String topLevelOrigin)
- LogWebSocketLoading(PAL::SessionID sessionID, String targetPrimaryDomain, String mainFramePrimaryDomain, WallTime lastSeen)
- LogSubresourceLoading(PAL::SessionID sessionID, String targetPrimaryDomain, String mainFramePrimaryDomain, WallTime lastSeen)
- LogSubresourceRedirect(PAL::SessionID sessionID, String sourcePrimaryDomain, String targetPrimaryDomain)
#endif
AddOriginAccessWhitelistEntry(String sourceOrigin, String destinationProtocol, String destinationHost, bool allowDestinationSubdomains);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp (240452 => 240453)
--- trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -92,10 +92,6 @@
if (m_resourceLoadStatistics)
return;
- // FIXME(193728): Support ResourceLoadStatistics for ephemeral sessions, too.
- if (m_sessionID.isEphemeral())
- return;
-
m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(*this, m_resourceLoadStatisticsDirectory);
}
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (240452 => 240453)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -555,7 +555,7 @@
SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory, parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectoryExtensionHandle);
- parameters.defaultDataStoreParameters.networkSessionParameters.enableResourceLoadStatistics = true; // FIXME(193705): m_configuration->resourceLoadStatisticsEnabled();
+ parameters.defaultDataStoreParameters.networkSessionParameters.enableResourceLoadStatistics = false; // FIXME(193297): Turn on when the feature is on. (m_configuration->resourceLoadStatisticsEnabled()?)
// Add any platform specific parameters
platformInitializeNetworkProcess(parameters);
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (240452 => 240453)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2019-01-24 23:41:30 UTC (rev 240453)
@@ -102,7 +102,7 @@
WTFMove(httpsProxy),
WTFMove(resourceLoadStatisticsDirectory),
WTFMove(resourceLoadStatisticsDirectoryHandle),
- true // FIXME(193705): m_configuration->resourceLoadStatisticsEnabled()
+ false // FIXME(193297): Switch to m_configuration->resourceLoadStatisticsEnabled()
};
auto cookieFile = resolvedCookieStorageFile();
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (240452 => 240453)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -1252,12 +1252,15 @@
// If we are deleting all of the data types that the resource load statistics store monitors
// we do not need to re-grandfather old data.
- auto shouldGrandfather = ((monitoredTypesRaw & deletedTypesRaw) == monitoredTypesRaw) ? ShouldGrandfatherStatistics::No : ShouldGrandfatherStatistics::Yes;
-
callbackAggregator->addPendingCallback();
- m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(shouldGrandfather, [callbackAggregator] {
- callbackAggregator->removePendingCallback();
- });
+ if ((monitoredTypesRaw & deletedTypesRaw) == monitoredTypesRaw)
+ m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(ShouldGrandfatherStatistics::No, [callbackAggregator] {
+ callbackAggregator->removePendingCallback();
+ });
+ else
+ m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(ShouldGrandfatherStatistics::Yes, [callbackAggregator] {
+ callbackAggregator->removePendingCallback();
+ });
callbackAggregator->addPendingCallback();
clearResourceLoadStatisticsInWebProcesses([callbackAggregator] {
@@ -2322,10 +2325,16 @@
return;
if (enabled) {
+ // FIXME(193297): Remove this assert
+ ASSERT(!m_resourceLoadStatistics);
enableResourceLoadStatisticsAndSetTestingCallback(nullptr);
return;
}
+ // FIXME(193297): Remove these two lines
+ unregisterWebResourceLoadStatisticsStoreAsMessageReceiver();
+ m_resourceLoadStatistics = nullptr;
+
for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) {
processPool->setResourceLoadStatisticsEnabled(false);
processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(false));
@@ -2386,8 +2395,16 @@
m_resourceLoadStatisticsEnabled = true;
setStatisticsTestingCallback(WTFMove(callback));
+ // FIXME(193297): Remove this check
+ if (m_resourceLoadStatistics)
+ return;
+
resolveDirectoriesIfNecessary();
+ // FIXME(193297): Remove these two lines
+ m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(*this);
+ registerWebResourceLoadStatisticsStoreAsMessageReceiver();
+
for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) {
processPool->setResourceLoadStatisticsEnabled(true);
processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(true));
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (240452 => 240453)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -388,18 +388,6 @@
ResourceLoadObserver::shared().setLogUserInteractionNotificationCallback([this] (PAL::SessionID sessionID, const String& topLevelOrigin) {
m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogUserInteraction(sessionID, topLevelOrigin), 0);
});
-
- ResourceLoadObserver::shared().setLogWebSocketLoadingNotificationCallback([this] (PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen) {
- m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogWebSocketLoading(sessionID, targetPrimaryDomain, mainFramePrimaryDomain, lastSeen), 0);
- });
-
- ResourceLoadObserver::shared().setLogSubresourceLoadingNotificationCallback([this] (PAL::SessionID sessionID, const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, WallTime lastSeen) {
- m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceLoading(sessionID, targetPrimaryDomain, mainFramePrimaryDomain, lastSeen), 0);
- });
-
- ResourceLoadObserver::shared().setLogSubresourceRedirectNotificationCallback([this] (PAL::SessionID sessionID, const String& sourcePrimaryDomain, const String& targetPrimaryDomain) {
- m_networkProcessConnection->connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceRedirect(sessionID, sourcePrimaryDomain, targetPrimaryDomain), 0);
- });
#endif
setTerminationTimeout(parameters.terminationTimeout);
Modified: trunk/Tools/ChangeLog (240452 => 240453)
--- trunk/Tools/ChangeLog 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Tools/ChangeLog 2019-01-24 23:41:30 UTC (rev 240453)
@@ -1,3 +1,16 @@
+2019-01-24 Truitt Savell <[email protected]>
+
+ Unreviewed, rolling out r240446.
+
+ Casued 5 API failures
+
+ Reverted changeset:
+
+ "Activate the WebResourceLoadStatisticsStore in the
+ NetworkProcess and deactivate it in the UIProcess."
+ https://bugs.webkit.org/show_bug.cgi?id=193297
+ https://trac.webkit.org/changeset/240446
+
2019-01-24 Zalan Bujtas <[email protected]>
DidFirstVisuallyNonEmptyLayout milestone should always fire at some point.
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (240452 => 240453)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2019-01-24 23:30:37 UTC (rev 240452)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2019-01-24 23:41:30 UTC (rev 240453)
@@ -1860,13 +1860,6 @@
void TestRunner::installStatisticsDidScanDataRecordsCallback(JSValueRef callback)
{
cacheTestRunnerCallback(StatisticsDidScanDataRecordsCallbackID, callback);
-
- bool notifyPagesWhenDataRecordsWereScanned = !!callback;
-
- // Setting a callback implies we expect to receive callbacks. So register for them.
- WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("StatisticsNotifyPagesWhenDataRecordsWereScanned"));
- WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(notifyPagesWhenDataRecordsWereScanned));
- WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), messageBody.get(), nullptr);
}
void TestRunner::statisticsDidScanDataRecordsCallback()