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.
<rdar://problem/48448715>
Hi Aaron! Thanks for reporting. I will have a look.
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.
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.
Created attachment 364306 [details] Patch
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"
(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.
Created attachment 364331 [details] Patch for landing
Comment on attachment 364331 [details] Patch for landing Clearing flags on attachment: 364331 Committed r242764: <https://trac.webkit.org/changeset/242764>
All reviewed patches have been landed. Closing bug.