Summary: | Resource Load Statistics: Check both origins and cookieHostNames for domain matches in data removal | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | John Wilander <wilander> | ||||||||||
Component: | WebKit2 | Assignee: | John Wilander <wilander> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | achristensen, beidson, bfulgham, buildbot, commit-queue, rniwa, webkit-bug-importer, wilander, youennf | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=170798 | ||||||||||||
Attachments: |
|
Description
John Wilander
2017-04-11 22:26:18 PDT
Created attachment 306890 [details]
Patch
Comment on attachment 306890 [details] Patch Attachment 306890 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3522314 New failing tests: webrtc/negotiatedneeded-event-addStream.html Created attachment 306892 [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
(In reply to Build Bot from comment #3) > Comment on attachment 306890 [details] > Patch > > Attachment 306890 [details] did not pass mac-wk2-ews (mac-wk2): > Output: http://webkit-queues.webkit.org/results/3522314 > > New failing tests: > webrtc/negotiatedneeded-event-addStream.html Crash is unrelated to this patch. This is a new regression tracked in bug 170754 Testing requires https://bugs.webkit.org/show_bug.cgi?id=170798. Comment on attachment 306890 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306890&action=review I think this looks good, but we need a WK2 reviewer. > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.cpp:120 > +bool WebsiteDataRecord::validForTopPrivatelyControlledDomain(const String& topPrivatelyControlledDomain) It seems like this could be 'const'. > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:501 > + fetchData(dataTypes, fetchOptions, [topPrivatelyControlledDomains, completionHandler, this](auto existingDataRecords) { Since ebsiteDataStore::fetchData does a WTFMove on the records it passes to this completion handler, it seems like "auto existingDataRecords" should really be "auto&& existingDataRecords". > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:507 > + matchingDataRecords.append(dataRecord); Maybe this could be WTFMove'd into matchindDataRecords? Might need to make "auto& dataRecord" -> "auto&& dataRecord"? Not sure if that works. > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:508 > + domainsWithMatchingDataRecords.append(topPrivatelyControlledDomain); Maybe this could be WTFMove'd, too? Created attachment 307325 [details]
Patch
Thanks, Brent! I could fix all the things you mentioned except for the last WTFMove of topPrivatelyControlledDomain. I suspect the compiler gets upset because I'm moving an element in the set I'm iterating over but if you can spot a mistake I've made I'm happy to try again I had to introduce move semantics for that vector all the way from the call in WebResourceLoadStatisticsStore::removeDataRecords(). Comment on attachment 307325 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=307325&action=review r=me > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.cpp:132 > + for (auto& dataRecordOriginData : origins) { Can this be const auto&? > Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp:507 > + if (dataRecord.validForTopPrivatelyControlledDomain(topPrivatelyControlledDomain)) { > + matchingDataRecords.append(WTFMove(dataRecord)); Maybe matchesTopPrivatelyControlledDomain would be a better name than validForTopPrivatelyControlledDomain. Created attachment 307441 [details]
Patch for landing
Comment on attachment 307441 [details] Patch for landing Clearing flags on attachment: 307441 Committed r215491: <http://trac.webkit.org/changeset/215491> All reviewed patches have been landed. Closing bug. |