Bug 229847 - Safari’s Privacy Report window is completely blank
Summary: Safari’s Privacy Report window is completely blank
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-02 20:02 PDT by Kate Cheney
Modified: 2021-09-03 15:48 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.82 KB, patch)
2021-09-02 20:05 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (13.95 KB, patch)
2021-09-03 12:19 PDT, Kate Cheney
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (14.00 KB, patch)
2021-09-03 12:36 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (15.97 KB, patch)
2021-09-03 14:06 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (13.45 KB, patch)
2021-09-03 14:45 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (13.28 KB, patch)
2021-09-03 14:56 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2021-09-02 20:02:54 PDT
Safari’s Privacy Report window is completely blank
Comment 1 Kate Cheney 2021-09-02 20:03:18 PDT
rdar://80974688
Comment 2 Kate Cheney 2021-09-02 20:05:07 PDT
Created attachment 437237 [details]
Patch
Comment 3 Chris Dumez 2021-09-03 07:21:35 PDT
Comment on attachment 437237 [details]
Patch

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

r=me

> Source/WebKit/ChangeLog:9
> +        No new tests, suspension kicks in 30 seconds after a web process

You could imagine an SPI to tweak that delay but OK.
Comment 4 Kate Cheney 2021-09-03 12:19:16 PDT
Created attachment 437294 [details]
Patch
Comment 5 Kate Cheney 2021-09-03 12:19:42 PDT
Added a test, would like another review in case I did something silly!
Comment 6 Chris Dumez 2021-09-03 12:25:17 PDT
Comment on attachment 437294 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:86
> +- (void)_suspendAllCachedWebProcesses WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

I'd much rather we have a single SPI to tweak cachedProcessSuspensionDelay, as I suggested.
Comment 7 Kate Cheney 2021-09-03 12:36:40 PDT
Created attachment 437296 [details]
Patch
Comment 8 Chris Dumez 2021-09-03 12:46:03 PDT
Comment on attachment 437296 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:86
> +- (void)_suspendAllCachedWebProcesses WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

This new iteration still has the same issue.
Comment 9 Kate Cheney 2021-09-03 13:04:53 PDT
(In reply to Chris Dumez from comment #8)
> Comment on attachment 437296 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=437296&action=review
> 
> > Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:86
> > +- (void)_suspendAllCachedWebProcesses WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
> 
> This new iteration still has the same issue.

Sorry, I missed your comment and was just posting to adjust the build failures.
Comment 10 Kate Cheney 2021-09-03 14:06:39 PDT
Created attachment 437310 [details]
Patch
Comment 11 Chris Dumez 2021-09-03 14:14:04 PDT
Comment on attachment 437310 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:85
> +- (void)_keepCachedProcessesAliveForTesting:(BOOL)shouldKeepCachedProcessesAliveForTesting WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

Why do we still have this? I think we should avoid adding this.

> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:86
> +- (void)_setCachedProcessSuspensionDelayForTesting:(double)delayInSeconds WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

This could be:
+ (void)_setCachedProcessSuspensionDelayForTesting:(double)delayInSeconds WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

since this is static internally.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:1355
> +    [dataStore _setCachedProcessSuspensionDelayForTesting:0];

Could be [WKWebsiteDataStore _setCachedProcessSuspensionDelayForTesting:0] with the change I suggested above.
Comment 12 Kate Cheney 2021-09-03 14:45:40 PDT
Created attachment 437315 [details]
Patch
Comment 13 Chris Dumez 2021-09-03 14:50:26 PDT
Comment on attachment 437315 [details]
Patch

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

> Source/WebKit/UIProcess/WebProcessCache.cpp:44
> +static Seconds& cachedProcessSuspensionDelay()

Why do we need a function, I don't see any reason why we cannot keep my global and drop "constexpr", is there?

> Source/WebKit/UIProcess/WebProcessCache.cpp:327
> +#if PLATFORM(MAC)

Either outside the function or inside but not both :)
Comment 14 Kate Cheney 2021-09-03 14:54:56 PDT
Comment on attachment 437315 [details]
Patch

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

>> Source/WebKit/UIProcess/WebProcessCache.cpp:44
>> +static Seconds& cachedProcessSuspensionDelay()
> 
> Why do we need a function, I don't see any reason why we cannot keep my global and drop "constexpr", is there?

No good reason except me being silly

>> Source/WebKit/UIProcess/WebProcessCache.cpp:327
>> +#if PLATFORM(MAC)
> 
> Either outside the function or inside but not both :)

Oops, Friday brain. Will fix.
Comment 15 Kate Cheney 2021-09-03 14:56:38 PDT
Created attachment 437317 [details]
Patch
Comment 16 Chris Dumez 2021-09-03 14:59:40 PDT
Comment on attachment 437317 [details]
Patch

r=me
Comment 17 EWS 2021-09-03 15:48:14 PDT
Committed r282034 (241336@main): <https://commits.webkit.org/241336@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437317 [details].