WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170763
Resource Load Statistics: Check both origins and cookieHostNames for domain matches in data removal
https://bugs.webkit.org/show_bug.cgi?id=170763
Summary
Resource Load Statistics: Check both origins and cookieHostNames for domain m...
John Wilander
Reported
2017-04-11 22:26:18 PDT
WebsiteDataRecords either have origins, cookieHostNames, or both depending on their WebsiteDataTypes. We need to check both for a match during data record removal.
Attachments
Patch
(6.07 KB, patch)
2017-04-11 22:55 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(904.72 KB, application/zip)
2017-04-12 00:13 PDT
,
Build Bot
no flags
Details
Patch
(25.09 KB, patch)
2017-04-17 17:48 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch for landing
(25.12 KB, patch)
2017-04-18 17:22 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-04-11 22:28:14 PDT
<
rdar://problem/31573091
>
John Wilander
Comment 2
2017-04-11 22:55:58 PDT
Created
attachment 306890
[details]
Patch
Build Bot
Comment 3
2017-04-12 00:13:13 PDT
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
Build Bot
Comment 4
2017-04-12 00:13:14 PDT
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
youenn fablet
Comment 5
2017-04-12 11:25:44 PDT
(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
John Wilander
Comment 6
2017-04-12 18:20:43 PDT
Testing requires
https://bugs.webkit.org/show_bug.cgi?id=170798
.
Brent Fulgham
Comment 7
2017-04-13 09:32:16 PDT
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?
John Wilander
Comment 8
2017-04-17 17:48:29 PDT
Created
attachment 307325
[details]
Patch
John Wilander
Comment 9
2017-04-17 17:52:26 PDT
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().
Alex Christensen
Comment 10
2017-04-18 14:41:00 PDT
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.
John Wilander
Comment 11
2017-04-18 17:22:43 PDT
Created
attachment 307441
[details]
Patch for landing
WebKit Commit Bot
Comment 12
2017-04-18 18:07:08 PDT
Comment on
attachment 307441
[details]
Patch for landing Clearing flags on attachment: 307441 Committed
r215491
: <
http://trac.webkit.org/changeset/215491
>
WebKit Commit Bot
Comment 13
2017-04-18 18:07:09 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.
Top of Page
Format For Printing
XML
Clone This Bug