-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Experimental] Further relax general deletion of script-written website data to 400 days #46107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
EWS run on previous version of this PR (hash e18123d) |
e18123d to
3758ba8
Compare
|
EWS run on previous version of this PR (hash 3758ba8) |
3758ba8 to
db7e027
Compare
|
EWS run on previous version of this PR (hash db7e027) |
db7e027 to
c4a496a
Compare
|
EWS run on previous version of this PR (hash c4a496a) |
c4a496a to
c194314
Compare
|
EWS run on previous version of this PR (hash c194314) |
c194314 to
49e3487
Compare
|
EWS run on previous version of this PR (hash 49e3487) |
49e3487 to
af0e0ea
Compare
|
EWS run on previous version of this PR (hash af0e0ea) |
af0e0ea to
acb2c77
Compare
|
EWS run on previous version of this PR (hash acb2c77) |
| removeDataRecords([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { | ||
| ASSERT(!RunLoop::isMain()); | ||
| RefPtr protectedThis = weakThis.get(); | ||
| if (!protectedThis) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not calling the completion handler here
| if (RefPtr statisticsStore = m_statisticsStore) { | ||
| statisticsStore->processStatisticsAndDataRecords([weakThis = ThreadSafeWeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { | ||
| if (RefPtr store = weakThis.get()) | ||
| store->postTaskReply(WTFMove(completionHandler)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here, if this is gone the completion handler will never be called
| } | ||
|
|
||
| void ResourceLoadStatisticsStore::processStatisticsAndDataRecords() | ||
| void ResourceLoadStatisticsStore::processStatisticsAndDataRecords(CompletionHandler<void()>&& completionHandler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to add this completion handler in this change? It's not clear to me why this is related to extending the days on script-written data deletion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are flakey. I'll add this into the commit message. If we don't move the completion handler, then many of the resourceLoadStatistics tests will call processStatisticsAndDataRecords multiple times, and those calls will overlap. This invalidates some of the test results because the test expectations depend on the state of the database at specific times. The current code runs processStatisticsAndDataRecords asynchronously, so there's no way to verify the state of website data at specific time points.
acb2c77 to
96ccdc3
Compare
|
EWS run on previous version of this PR (hash 96ccdc3) |
96ccdc3 to
3fb2cf8
Compare
|
EWS run on current version of this PR (hash 3fb2cf8) |
|
EWS run on previous version of this PR (hash 3fb2cf8) |
…te data to 400 days https://bugs.webkit.org/show_bug.cgi?id=293793 rdar://152095900 Reviewed by NOBODY (OOPS!). 274398@main introduced a "long" DataRemovalFrequency that was set at 30 operational days. This patch extends that lifetime to 400 operational days. This roughly aligns web storage with the proposed upper-limit on cookie age [0] (although the cookie age is strictly based on calendar days). We may change this behavior in the future, again. This patch fixes some flakey tests by giving ResourceLoadStatisticsStore::processStatisticsAndDataRecords a completion handler that is called when the process completes. It seems like our thread hopping performance has regressed a bit since these tests were written. This patch also adds a new test that verifies the state of the website data and database after 399 days. The code changes make explicit how each time period is used: - deletion of prevalent domain data (30 operation days) - deletion of script-written website data when link decoration filtering is disabled (7 operational days) - deletion of script-written website data when link decoration filtering is enabled (400 operational days) [0] https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#name-cookie-lifetime-limits * LayoutTests/http/tests/resourceLoadStatistics/operating-dates-all-website-data-removed.html: * LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html: * LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-filtered-link-decoration-after-long-deletion-expected.txt: * LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-filtered-link-decoration-after-long-deletion.html: * LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-filtered-link-decoration-before-long-deletion-expected.txt: Copied from LayoutTests/platform/glib/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-filtered-link-decoration-after-long-deletion-expected.txt. * LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-filtered-link-decoration-before-long-deletion.html: Copied from LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-filtered-link-decoration-after-long-deletion.html. * LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-without-link-decoration-expected.txt: * LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-without-link-decoration.html: * LayoutTests/platform/glib/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-filtered-link-decoration-after-long-deletion-expected.txt: * LayoutTests/platform/glib/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-without-link-decoration-expected.txt: * Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: (WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords): (WebKit::ResourceLoadStatisticsStore::scheduleStatisticsProcessingRequestIfNecessary): (WebKit::ResourceLoadStatisticsStore::resetParametersToDefaultValues): (WebKit::ResourceLoadStatisticsStore::grantStorageAccess): (WebKit::ResourceLoadStatisticsStore::grantStorageAccessInternal): (WebKit::ResourceLoadStatisticsStore::logUserInteraction): (WebKit::ResourceLoadStatisticsStore::areAllUnpartitionedThirdPartyCookiesBlockedUnder): (WebKit::ResourceLoadStatisticsStore::hasHadRecentWebPushInteraction const): (WebKit::ResourceLoadStatisticsStore::hasHadUnexpiredRecentUserInteraction): (WebKit::ResourceLoadStatisticsStore::shouldRemoveAllWebsiteDataFor): (WebKit::ResourceLoadStatisticsStore::shouldRemoveAllButCookiesFor): (WebKit::ResourceLoadStatisticsStore::updateOperatingDatesParameters): (WebKit::ResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary): (WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired const): * Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: * Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing): (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated): (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
3fb2cf8 to
772ed3b
Compare
|
EWS run on current version of this PR (hash 772ed3b) |
🧪 bindings
772ed3b
772ed3b