RESOLVED FIXED 172155
Resource Load Statistics: Grandfather domains for existing data records
https://bugs.webkit.org/show_bug.cgi?id=172155
Summary Resource Load Statistics: Grandfather domains for existing data records
John Wilander
Reported 2017-05-15 18:30:23 PDT
We should grandfather domains for existing data records so allow ample time to capture user interaction.
Attachments
Patch (70.71 KB, patch)
2017-05-15 19:33 PDT, John Wilander
no flags
Patch (70.89 KB, patch)
2017-05-16 10:16 PDT, John Wilander
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.18 MB, application/zip)
2017-05-16 11:20 PDT, Build Bot
no flags
Patch (70.91 KB, patch)
2017-05-16 11:46 PDT, John Wilander
no flags
Patch (70.98 KB, patch)
2017-05-16 11:51 PDT, John Wilander
no flags
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (936.58 KB, application/zip)
2017-05-16 13:07 PDT, Build Bot
no flags
Patch (71.00 KB, patch)
2017-05-16 15:08 PDT, John Wilander
no flags
Patch (72.23 KB, patch)
2017-05-16 16:04 PDT, John Wilander
no flags
Patch for landing (72.30 KB, patch)
2017-05-17 16:37 PDT, John Wilander
no flags
Patch (72.70 KB, patch)
2017-05-18 11:27 PDT, John Wilander
no flags
John Wilander
Comment 1 2017-05-15 18:31:48 PDT
John Wilander
Comment 2 2017-05-15 19:33:12 PDT
John Wilander
Comment 3 2017-05-16 10:16:30 PDT
Build Bot
Comment 4 2017-05-16 11:20:29 PDT
Comment on attachment 310270 [details] Patch Attachment 310270 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3751624 New failing tests: http/tests/loading/resourceLoadStatistics/grandfathering.html
Build Bot
Comment 5 2017-05-16 11:20:31 PDT
Created attachment 310279 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
John Wilander
Comment 6 2017-05-16 11:46:48 PDT
John Wilander
Comment 7 2017-05-16 11:51:00 PDT
John Wilander
Comment 8 2017-05-16 12:02:22 PDT
The test case is not timing out on my machine which is why I'm trying a few things here to see what the bots do.
Build Bot
Comment 9 2017-05-16 13:07:01 PDT
Comment on attachment 310288 [details] Patch Attachment 310288 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3752175 New failing tests: http/tests/loading/resourceLoadStatistics/grandfathering.html
Build Bot
Comment 10 2017-05-16 13:07:02 PDT
Created attachment 310292 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
John Wilander
Comment 11 2017-05-16 15:08:04 PDT
John Wilander
Comment 12 2017-05-16 16:04:06 PDT
Alex Christensen
Comment 13 2017-05-17 13:47:20 PDT
Comment on attachment 310312 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=310312&action=review > Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:47 > +// 3 days in seconds > +static auto grandfatheringTime = 259200; static const auto secondsPerDay = 24 * 3600; static auto grandfatheringTime = 3 * secondsPerDay; etc. > Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:103 > + if (version > 3) { static const auto minimumVersionWithGrandfathering = 3; > Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:346 > + double now = currentTime(); This local variable seems excessive. > Source/WebCore/loader/ResourceLoadStatisticsStore.h:94 > + double m_endOfGrandfatheringTimestamp { 0 }; > + double m_lastTimeDataRecordsWereRemoved { 0 }; double -> Seconds? > Source/WebKit2/UIProcess/WebProcessProxy.cpp:268 > +void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, std::function<void(HashSet<String>&&)> completionHandler) I know we use std::function elsewhere in this file, but I don't think we should keep adding std::function where we can use Function, even if it differs in style from nearby code, unless it would require huge refactoring to not. > Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.h:-50 > - WK_EXPORT void WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval(double seconds); I assume this has never been adopted so we don't need to keep it in for binary compatibility with anything. > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:526 > + for (auto&& dataRecord : existingDataRecords) auto&& cool!
John Wilander
Comment 14 2017-05-17 16:37:34 PDT
Created attachment 310459 [details] Patch for landing
John Wilander
Comment 15 2017-05-17 16:40:19 PDT
(In reply to Alex Christensen from comment #13) > Comment on attachment 310312 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=310312&action=review > > > Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:47 > > +// 3 days in seconds > > +static auto grandfatheringTime = 259200; > > static const auto secondsPerDay = 24 * 3600; > static auto grandfatheringTime = 3 * secondsPerDay; > etc. Good suggestion. Fixed. > > Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:103 > > + if (version > 3) { > > static const auto minimumVersionWithGrandfathering = 3; Fixed. > > Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:346 > > + double now = currentTime(); > > This local variable seems excessive. True. > > Source/WebCore/loader/ResourceLoadStatisticsStore.h:94 > > + double m_endOfGrandfatheringTimestamp { 0 }; > > + double m_lastTimeDataRecordsWereRemoved { 0 }; > > double -> Seconds? This I think goes into the bucked of changes we should do in an overhaul. Andy brought up the same thing earlier. > > Source/WebKit2/UIProcess/WebProcessProxy.cpp:268 > > +void WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData(OptionSet<WebsiteDataType> dataTypes, bool shouldNotifyPage, std::function<void(HashSet<String>&&)> completionHandler) > > I know we use std::function elsewhere in this file, but I don't think we > should keep adding std::function where we can use Function, even if it > differs in style from nearby code, unless it would require huge refactoring > to not. Yes, I know you've said this before and so has Andy. Should I file a Bugzilla to work through the WebProcessProxy and the WebsiteDataStore classes and do this change? > > Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.h:-50 > > - WK_EXPORT void WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval(double seconds); > > I assume this has never been adopted so we don't need to keep it in for > binary compatibility with anything. I was never implemented. > > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:526 > > + for (auto&& dataRecord : existingDataRecords) > > auto&& > cool! Thanks, Alex!
WebKit Commit Bot
Comment 16 2017-05-17 16:55:28 PDT
Comment on attachment 310459 [details] Patch for landing Clearing flags on attachment: 310459 Committed r217014: <http://trac.webkit.org/changeset/217014>
WebKit Commit Bot
Comment 17 2017-05-17 16:55:30 PDT
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 18 2017-05-17 17:34:46 PDT
Ryan Haddad
Comment 19 2017-05-17 17:37:16 PDT
Reverted r217014 for reason: This change caused mac-wk2 LayoutTests to exit early due to crashes. Committed r217020: <http://trac.webkit.org/changeset/217020>
John Wilander
Comment 20 2017-05-18 11:27:08 PDT
WebKit Commit Bot
Comment 21 2017-05-18 14:50:08 PDT
Comment on attachment 310522 [details] Patch Clearing flags on attachment: 310522 Committed r217068: <http://trac.webkit.org/changeset/217068>
WebKit Commit Bot
Comment 22 2017-05-18 14:50:10 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.