Log Message
Cherry-pick r261140. rdar://problem/62993055
[iOS] Make sure TestController::statisticsResetToConsistentState() does not hang due to process suspension https://bugs.webkit.org/show_bug.cgi?id=211421 Reviewed by Maciej Stachowiak. We have evidence of hangs in TestController::statisticsResetToConsistentState() on iOS and we suspect it is due to process suspension. To address the issue, this patch updates the IPCs being sent as a result of a call to statisticsResetToConsistentState() to take a background assertion while waiting for the IPC response. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::setUseITPDatabase): (WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources): (WebKit::NetworkProcessProxy::resetParametersToDefaultValues): (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent): (WebKit::NetworkProcessProxy::resetCrossSiteLoadsWithLinkDecorationForTesting): (WebKit::NetworkProcessProxy::setShouldDowngradeReferrerForTesting): (WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting): (WebKit::NetworkProcessProxy::setShouldEnbleSameSiteStrictEnforcementForTesting): (WebKit::NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.1.12-branch/Source/WebKit/ChangeLog (261344 => 261345)
--- branches/safari-610.1.12-branch/Source/WebKit/ChangeLog 2020-05-07 23:22:14 UTC (rev 261344)
+++ branches/safari-610.1.12-branch/Source/WebKit/ChangeLog 2020-05-07 23:50:23 UTC (rev 261345)
@@ -1,3 +1,58 @@
+2020-05-07 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r261140. rdar://problem/62993055
+
+ [iOS] Make sure TestController::statisticsResetToConsistentState() does not hang due to process suspension
+ https://bugs.webkit.org/show_bug.cgi?id=211421
+
+ Reviewed by Maciej Stachowiak.
+
+ We have evidence of hangs in TestController::statisticsResetToConsistentState() on iOS and we suspect it
+ is due to process suspension. To address the issue, this patch updates the IPCs being sent as a result of
+ a call to statisticsResetToConsistentState() to take a background assertion while waiting for the IPC
+ response.
+
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::setUseITPDatabase):
+ (WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources):
+ (WebKit::NetworkProcessProxy::resetParametersToDefaultValues):
+ (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
+ (WebKit::NetworkProcessProxy::resetCrossSiteLoadsWithLinkDecorationForTesting):
+ (WebKit::NetworkProcessProxy::setShouldDowngradeReferrerForTesting):
+ (WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting):
+ (WebKit::NetworkProcessProxy::setShouldEnbleSameSiteStrictEnforcementForTesting):
+ (WebKit::NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-05-04 Chris Dumez <cdu...@apple.com>
+
+ [iOS] Make sure TestController::statisticsResetToConsistentState() does not hang due to process suspension
+ https://bugs.webkit.org/show_bug.cgi?id=211421
+
+ Reviewed by Maciej Stachowiak.
+
+ We have evidence of hangs in TestController::statisticsResetToConsistentState() on iOS and we suspect it
+ is due to process suspension. To address the issue, this patch updates the IPCs being sent as a result of
+ a call to statisticsResetToConsistentState() to take a background assertion while waiting for the IPC
+ response.
+
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::setUseITPDatabase):
+ (WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources):
+ (WebKit::NetworkProcessProxy::resetParametersToDefaultValues):
+ (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
+ (WebKit::NetworkProcessProxy::resetCrossSiteLoadsWithLinkDecorationForTesting):
+ (WebKit::NetworkProcessProxy::setShouldDowngradeReferrerForTesting):
+ (WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting):
+ (WebKit::NetworkProcessProxy::setShouldEnbleSameSiteStrictEnforcementForTesting):
+ (WebKit::NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting):
+
2020-05-02 Simon Fraser <simon.fra...@apple.com>
handleWheelEventPhase() should include the relevant ScrollingNodeID
Modified: branches/safari-610.1.12-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (261344 => 261345)
--- branches/safari-610.1.12-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2020-05-07 23:22:14 UTC (rev 261344)
+++ branches/safari-610.1.12-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2020-05-07 23:50:23 UTC (rev 261345)
@@ -849,7 +849,9 @@
void NetworkProcessProxy::setUseITPDatabase(PAL::SessionID sessionID, bool value, CompletionHandler<void()>&& completionHandler)
{
- sendWithAsyncReply(Messages::NetworkProcess::SetUseITPDatabase(sessionID, value), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::SetUseITPDatabase(sessionID, value), [activity = throttler().backgroundActivity("NetworkProcessProxy::setUseITPDatabase"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::requestStorageAccessConfirm(WebPageProxyIdentifier pageID, FrameIdentifier frameID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, CompletionHandler<void(bool)>&& completionHandler)
@@ -980,7 +982,9 @@
return;
}
- sendWithAsyncReply(Messages::NetworkProcess::ResetCacheMaxAgeCapForPrevalentResources(sessionID), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::ResetCacheMaxAgeCapForPrevalentResources(sessionID), [activity = throttler().backgroundActivity("NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::resetParametersToDefaultValues(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
@@ -990,7 +994,9 @@
return;
}
- sendWithAsyncReply(Messages::NetworkProcess::ResetParametersToDefaultValues(sessionID), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::ResetParametersToDefaultValues(sessionID), [activity = throttler().backgroundActivity("NetworkProcessProxy::resetParametersToDefaultValues"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::submitTelemetry(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
@@ -1010,7 +1016,9 @@
return;
}
- sendWithAsyncReply(Messages::NetworkProcess::ScheduleClearInMemoryAndPersistent(sessionID, { }, shouldGrandfather), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::ScheduleClearInMemoryAndPersistent(sessionID, { }, shouldGrandfather), [activity = throttler().backgroundActivity("NetworkProcessProxy::scheduleClearInMemoryAndPersistent"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::logTestingEvent(PAL::SessionID sessionID, const String& event)
@@ -1088,7 +1096,9 @@
return;
}
- sendWithAsyncReply(Messages::NetworkProcess::ResetCrossSiteLoadsWithLinkDecorationForTesting(sessionID), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::ResetCrossSiteLoadsWithLinkDecorationForTesting(sessionID), [activity = throttler().backgroundActivity("NetworkProcessProxy::resetCrossSiteLoadsWithLinkDecorationForTesting"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::deleteCookiesForTesting(PAL::SessionID sessionID, const RegistrableDomain& domain, bool includeHttpOnlyCookies, CompletionHandler<void()>&& completionHandler)
@@ -1133,17 +1143,23 @@
return;
}
- sendWithAsyncReply(Messages::NetworkProcess::SetShouldDowngradeReferrerForTesting(enabled), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::SetShouldDowngradeReferrerForTesting(enabled), [activity = throttler().backgroundActivity("NetworkProcessProxy::setShouldDowngradeReferrerForTesting"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting(PAL::SessionID sessionID, ThirdPartyCookieBlockingMode blockingMode, CompletionHandler<void()>&& completionHandler)
{
- sendWithAsyncReply(Messages::NetworkProcess::SetShouldBlockThirdPartyCookiesForTesting(sessionID, blockingMode), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::SetShouldBlockThirdPartyCookiesForTesting(sessionID, blockingMode), [activity = throttler().backgroundActivity("NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::setShouldEnbleSameSiteStrictEnforcementForTesting(PAL::SessionID sessionID, WebCore::SameSiteStrictEnforcementEnabled enabled, CompletionHandler<void()>&& completionHandler)
{
- sendWithAsyncReply(Messages::NetworkProcess::SetShouldEnbleSameSiteStrictEnforcementForTesting(sessionID, enabled), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::SetShouldEnbleSameSiteStrictEnforcementForTesting(sessionID, enabled), [activity = throttler().backgroundActivity("NetworkProcessProxy::setShouldEnbleSameSiteStrictEnforcementForTesting"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting(PAL::SessionID sessionID, FirstPartyWebsiteDataRemovalMode mode, CompletionHandler<void()>&& completionHandler)
@@ -1153,7 +1169,9 @@
return;
}
- sendWithAsyncReply(Messages::NetworkProcess::SetFirstPartyWebsiteDataRemovalModeForTesting(sessionID, mode), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::NetworkProcess::SetFirstPartyWebsiteDataRemovalModeForTesting(sessionID, mode), [activity = throttler().backgroundActivity("NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
void NetworkProcessProxy::setToSameSiteStrictCookiesForTesting(PAL::SessionID sessionID, const RegistrableDomain& domain, CompletionHandler<void()>&& completionHandler)
Modified: branches/safari-610.1.12-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp (261344 => 261345)
--- branches/safari-610.1.12-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp 2020-05-07 23:22:14 UTC (rev 261344)
+++ branches/safari-610.1.12-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp 2020-05-07 23:50:23 UTC (rev 261345)
@@ -460,7 +460,9 @@
void WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting(ThirdPartyCookieBlockingMode thirdPartyCookieBlockingMode, CompletionHandler<void()>&& completionHandler)
{
- sendWithAsyncReply(Messages::WebProcess::SetShouldBlockThirdPartyCookiesForTesting(thirdPartyCookieBlockingMode), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::WebProcess::SetShouldBlockThirdPartyCookiesForTesting(thirdPartyCookieBlockingMode), [activity = throttler().backgroundActivity("WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting"_s), completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler();
+ });
}
#endif
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes