Bug 195117 - Move NetworkProcess/Classifier/ResourceLoadStatisticsStoreCocoa.mm functionality into UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
Summary: Move NetworkProcess/Classifier/ResourceLoadStatisticsStoreCocoa.mm functional...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-27 12:43 PST by Aaron
Modified: 2019-03-11 19:16 PDT (History)
5 users (show)

See Also:


Attachments
Patch (25.84 KB, patch)
2019-03-11 16:21 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch for landing (25.84 KB, patch)
2019-03-11 18:38 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron 2019-02-27 12:43:52 PST
Debugging a custom domain for ITP2 does not work for me at all on Safari Technology Preview: Release 76 (Safari 12.2, WebKit 14608.1.6.2). I followed the instructions here https://webkit.org/blog/8387/itp-debug-mode-in-safari-technology-preview-62/ and have tried deleting my history and cache and nothing.

When enabling debug mode, all i get in the terminal is

2019-02-27 15:41:38.718784-0500 0x21a17    Info        0x0                  16566  0    com.apple.WebKit.Networking: (WebKit) [com.apple.WebKit:ResourceLoadStatisticsDebug] Turned ITP Debug Mode on.
2019-02-27 15:41:38.732611-0500 0x21a17    Info        0x0                  16566  0    com.apple.WebKit.Networking: (WebKit) [com.apple.WebKit:ResourceLoadStatisticsDebug] About to block cookies in third-party contexts for: 3rdpartytestwebkit.org.
2019-02-27 15:41:38.736588-0500 0x21a17    Info        0x0                  16566  0    com.apple.WebKit.Networking: (WebKit) [com.apple.WebKit:ResourceLoadStatisticsDebug] Done updating cookie blocking.

which doesn't include my custom domain.
Comment 1 Radar WebKit Bug Importer 2019-02-27 13:46:28 PST
<rdar://problem/48448715>
Comment 2 John Wilander 2019-02-28 18:09:54 PST
Hi Aaron! Thanks for reporting. I will have a look.
Comment 3 Aaron 2019-02-28 18:46:48 PST
Thanks John, In the meantime I managed to find an older version of Safari tech preview and got this to work

>> log stream -info | grep ResourceLoadStatisticsDebug

2019-02-28 21:45:27.346931-0500 0x385a2    Info        0x0                  26919  0    Safari Technology Preview: (WebKit) [com.apple.WebKit:ResourceLoadStatisticsDebug] Did set test-domain.org as prevalent resource for the purposes of ITP Debug Mode.
Comment 4 John Wilander 2019-03-01 14:42:45 PST
I think this is because WebKit/UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm has not been moved to the network process. It could also make its calls over IPC.

WebKit/UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm reads user defaults to allow developers to set a custom domain as permanently classified under ITP Debug Mode. This was broken by the recent move of ITP from the UI process to the network process.
Comment 5 John Wilander 2019-03-11 16:21:05 PDT
Created attachment 364306 [details]
Patch
Comment 6 Brent Fulgham 2019-03-11 17:18:10 PDT
Comment on attachment 364306 [details]
Patch

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

Looks good.

> Source/WebKit/ChangeLog:13
> +        This patch make away with some old user defaults we don't use anymore. It also

"make away" -> "does away"
Comment 7 John Wilander 2019-03-11 18:37:02 PDT
(In reply to Brent Fulgham from comment #6)
> Comment on attachment 364306 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364306&action=review
> 
> Looks good.
> 
> > Source/WebKit/ChangeLog:13
> > +        This patch make away with some old user defaults we don't use anymore. It also
> 
> "make away" -> "does away"

Thanks! Will fix and land.
Comment 8 John Wilander 2019-03-11 18:38:40 PDT
Created attachment 364331 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2019-03-11 19:16:47 PDT
Comment on attachment 364331 [details]
Patch for landing

Clearing flags on attachment: 364331

Committed r242764: <https://trac.webkit.org/changeset/242764>
Comment 10 WebKit Commit Bot 2019-03-11 19:16:48 PDT
All reviewed patches have been landed.  Closing bug.