Bug 214401 - Fix ITP data summary when using the memory store and blocking all third-party cookies
Summary: Fix ITP data summary when using the memory store and blocking all third-party...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 213493
  Show dependency treegraph
 
Reported: 2020-07-16 03:31 PDT by Carlos Garcia Campos
Modified: 2020-07-21 05:19 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.11 KB, patch)
2020-07-16 03:34 PDT, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff
Patch for landing (3.53 KB, patch)
2020-07-21 03:08 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2020-07-16 03:31:15 PDT
The memory store behaves differently than the database one, it only includes prevalent resources in the list, while the database store includes all resources when cooking blocking policy is All.
Comment 1 Carlos Garcia Campos 2020-07-16 03:34:05 PDT
Created attachment 404432 [details]
Patch
Comment 2 Michael Catanzaro 2020-07-16 05:52:00 PDT
Comment on attachment 404432 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404432&action=review

I'm pretty sure this change is correct.

Let's give John a day or two to do the final review, though, since it's his code.

> Source/WebKit/ChangeLog:3
> +        Fix ITP data summary when using the memory satre and blocking all third-party cookies

memory store
Comment 3 katherine_cheney 2020-07-20 08:56:40 PDT
Great catch! I am the engineer who added the ITP data summary, this change looks good. It would be nice to also update the ITP data summary test case in this patch before landing, looks like it is missing the piece of code which turns off database mode.

You can turn it off by adding:

 static bool doneFlag = false;
    [dataStore _setUseITPDatabase:false completionHandler: ^(void) {
        doneFlag = true;
    }];

    TestWebKitAPI::Util::run(&doneFlag);

right after calling 

[dataStore _setResourceLoadStatisticsEnabled:YES] 

in the GetResourceLoadStatisticsDataSummary test in TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm. The test should fail before your change, and pass after.
Comment 4 Carlos Garcia Campos 2020-07-21 03:08:42 PDT
Created attachment 404805 [details]
Patch for landing
Comment 5 Carlos Garcia Campos 2020-07-21 05:19:00 PDT
Committed r264650: <https://trac.webkit.org/changeset/264650>
Comment 6 Radar WebKit Bug Importer 2020-07-21 05:19:15 PDT
<rdar://problem/65878342>