Reset cookie partitioning state after network process crashes
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2017 18:57:20 +0000 (18:57 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jul 2017 18:57:20 +0000 (18:57 +0000)
commitf1c434dfc85c30aa74160d3bdb910fdc2c4d91e4
tree0fe209b9540f03620dd9e32e2c623dd5f3e432cd
parent02751c158d3ab1a2ed93147fe44dc5a87e681427
Reset cookie partitioning state after network process crashes
https://bugs.webkit.org/show_bug.cgi?id=174306
<rdar://problem/33171605>

Reviewed by Chris Dumez.

Source/WebKit2:

* UIProcess/Storage/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler): Move cookie
partioning state code to helper function.
(WebKit::ResourceLoadStatisticsStore::resetPartitionCookiesState): Added.
* UIProcess/Storage/ResourceLoadStatisticsStore.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess): Inform the statistics store that
the network process crashed.
(WebKit::WebProcessPool::terminateNetworkProcess): Mark network process as crashed.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::networkProcessDidCrash): Reset the cookie
partitioning state after a crash.
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::notifyResourceLoadStatisticsNetworkProcessDidCrash): Relay
information to the statistics store.
* UIProcess/WebsiteData/WebsiteDataStore.h:

LayoutTests:

* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-network-process-crash-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-network-process-crash.html: Added.
* http/tests/loading/resourceLoadStatistics/resources/get-cookies.php:
* http/tests/loading/resourceLoadStatistics/resources/set-cookie.php:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-network-process-crash-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-network-process-crash.html [new file with mode: 0644]
LayoutTests/http/tests/loading/resourceLoadStatistics/resources/get-cookies.php
LayoutTests/http/tests/loading/resourceLoadStatistics/resources/set-cookie.php
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp
Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.h
Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h