RESOLVED FIXED 174306
Reset cookie partitioning state after network process crashes
https://bugs.webkit.org/show_bug.cgi?id=174306
Summary Reset cookie partitioning state after network process crashes
Brent Fulgham
Reported 2017-07-09 20:04:42 PDT
When the network process crashes, we need to notify the respawned process of the current knowledge of prevalent resources and other load statistics.
Attachments
Patch (26.51 KB, patch)
2017-07-10 11:35 PDT, Brent Fulgham
no flags
Patch (26.41 KB, patch)
2017-07-10 12:45 PDT, Brent Fulgham
no flags
Patch (26.56 KB, patch)
2017-07-10 12:55 PDT, Brent Fulgham
no flags
Patch (27.68 KB, patch)
2017-07-10 19:30 PDT, Brent Fulgham
no flags
Archive of layout-test-results from ews112 for mac-elcapitan (1.73 MB, application/zip)
2017-07-10 20:52 PDT, Build Bot
no flags
Patch (Rebaselined) (25.21 KB, patch)
2017-07-10 21:17 PDT, Brent Fulgham
no flags
Patch (25.78 KB, patch)
2017-07-11 10:21 PDT, Brent Fulgham
no flags
Patch (25.69 KB, patch)
2017-07-11 10:40 PDT, Brent Fulgham
cdumez: review+
Brent Fulgham
Comment 1 2017-07-09 20:05:04 PDT
Brent Fulgham
Comment 2 2017-07-10 11:35:45 PDT
Brent Fulgham
Comment 3 2017-07-10 12:45:45 PDT
Brent Fulgham
Comment 4 2017-07-10 12:55:32 PDT
Brent Fulgham
Comment 5 2017-07-10 19:30:21 PDT
Build Bot
Comment 6 2017-07-10 20:52:13 PDT
Comment on attachment 315064 [details] Patch Attachment 315064 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4097651 New failing tests: storage/indexeddb/modern/new-database-after-user-delete.html
Build Bot
Comment 7 2017-07-10 20:52:14 PDT
Created attachment 315071 [details] Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Brent Fulgham
Comment 8 2017-07-10 21:17:40 PDT
Created attachment 315074 [details] Patch (Rebaselined)
Chris Dumez
Comment 9 2017-07-10 23:45:44 PDT
Comment on attachment 315074 [details] Patch (Rebaselined) View in context: https://bugs.webkit.org/attachment.cgi?id=315074&action=review Bots are red. Will do a proper review tomorrow. > Source/WebKit2/UIProcess/WebProcessPool.cpp:485 > +#if HAVE(CFNETWORK_STORAGE_PARTITIONING) The method we're calling is is not specific to partitioning (at least based on its name) and could be extended in the future to do other things. Therefore, I would move this ifdef to the implementation, where we actually call a partitioning-related method. > Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:634 > +void WebResourceLoadStatisticsStore::networkProcessDidCrash() I would call this scheduleCookiePartitioningStateReset. The "schedule" prefix is a pattern I have used for other methods in this class that dispatch to a background queue before doing something. > Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.h:154 > + void resetPartitionCookiesState(); Where is the implementation? Also, I would call this resetCookiePartitioningState. > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:1108 > +void WebsiteDataStore::notifyResourceLoadStatisticsNetworkProcessDidCrash() I would just call this one networkProcessDidCrash(). You could imagine it being useful for other things than load statistics.
Brent Fulgham
Comment 10 2017-07-11 10:21:40 PDT
Brent Fulgham
Comment 11 2017-07-11 10:32:35 PDT
Comment on attachment 315074 [details] Patch (Rebaselined) View in context: https://bugs.webkit.org/attachment.cgi?id=315074&action=review >> Source/WebKit2/UIProcess/WebProcessPool.cpp:485 >> +#if HAVE(CFNETWORK_STORAGE_PARTITIONING) > > The method we're calling is is not specific to partitioning (at least based on its name) and could be extended in the future to do other things. Therefore, I would move this ifdef to the implementation, where we actually call a partitioning-related method. Will do. >> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:634 >> +void WebResourceLoadStatisticsStore::networkProcessDidCrash() > > I would call this scheduleCookiePartitioningStateReset. The "schedule" prefix is a pattern I have used for other methods in this class that dispatch to a background queue before doing something. Makes sense. >> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.h:154 >> + void resetPartitionCookiesState(); > > Where is the implementation? Also, I would call this resetCookiePartitioningState. yes -- that's why the bots are red! Too many merges yesterday! :-) >> Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:1108 >> +void WebsiteDataStore::notifyResourceLoadStatisticsNetworkProcessDidCrash() > > I would just call this one networkProcessDidCrash(). You could imagine it being useful for other things than load statistics. Will do.
Brent Fulgham
Comment 12 2017-07-11 10:40:18 PDT
Chris Dumez
Comment 13 2017-07-11 10:55:02 PDT
Comment on attachment 315129 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315129&action=review r=me if the bots are happy. > Source/WebKit2/UIProcess/WebProcessPool.cpp:485 > + m_websiteDataStore->websiteDataStore().networkProcessDidCrash(); Using websiteDataStore() instead of m_websiteDataStore would look safer as it returns a reference. > LayoutTests/http/tests/loading/resourceLoadStatistics/resources/get-cookies.php:13 > +if(!isset($_COOKIE[$_GET["name3"]])) { Could we also check that isset($_GET["name3"]) to avoid having to rebaseline other tests that do not have a name3?
Brent Fulgham
Comment 14 2017-07-11 11:17:18 PDT
Comment on attachment 315129 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315129&action=review >> Source/WebKit2/UIProcess/WebProcessPool.cpp:485 >> + m_websiteDataStore->websiteDataStore().networkProcessDidCrash(); > > Using websiteDataStore() instead of m_websiteDataStore would look safer as it returns a reference. Will do. >> LayoutTests/http/tests/loading/resourceLoadStatistics/resources/get-cookies.php:13 >> +if(!isset($_COOKIE[$_GET["name3"]])) { > > Could we also check that isset($_GET["name3"]) to avoid having to rebaseline other tests that do not have a name3? Yep. I just tried this and it works properly. It also reduces the size of this change.
Brent Fulgham
Comment 15 2017-07-11 11:57:22 PDT
Note You need to log in before you can comment on or make changes to this bug.