[Webkit-unassigned] [Bug 232314] New: Crashing when fetching WebsiteDataType::ResourceLoadStatistics in ephemeral sessions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 26 09:51:45 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=232314
Bug ID: 232314
Summary: Crashing when fetching
WebsiteDataType::ResourceLoadStatistics in ephemeral
sessions
Product: WebKit
Version: WebKit Nightly Build
Hardware: PC
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit2
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcatanzaro at gnome.org
CC: kkinnunen at apple.com, wilander at apple.com
Reproducer: create an incognito mode window in Epiphany, open preferences, then open the personal data dialog. The network process will crash.
Detailed backtrace here: https://bugzilla-attachments.redhat.com/attachment.cgi?id=1837253&t=Coz3VzYSQm. That backtrace is for 2.32, but I've just reproduced with 2.34.1.
Problem is Epiphany fetches all types of website data, as is reasonable. NetworkProcess::fetchWebsiteData does this:
#if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
if (websiteDataTypes.contains(WebsiteDataType::ResourceLoadStatistics)) {
if (auto* session = networkSession(sessionID)) {
if (auto* resourceLoadStatistics = session->resourceLoadStatistics()) {
resourceLoadStatistics->registrableDomains([callbackAggregator](auto&& domains) mutable {
while (!domains.isEmpty())
callbackAggregator->m_websiteData.registrableDomainsWithResourceLoadStatistics.add(domains.takeLast());
});
}
}
}
#endif
The call to WebResourceLoadStatisticsStore::registrableDomains calls WebResourceLoadStatisticsStore::postTask, and that does this:
// Resource load statistics should not be captured for ephemeral sessions.
RELEASE_ASSERT(!isEphemeral());
Oops. We either need an early return in NetworkProcess::fetchWebsiteData, or perhaps better in WebResourceLoadStatisticsStore::registrableDomains? Or maybe it would be better if NetworkSession::resourceLoadStatistics would return nullptr rather than a valid WebResourceLoadStatisticsStore when we have an ephemeral session? Or for NetworkSession::setResourceLoadStatisticsEnabled to never be called in the first place? That's ultimately triggered via WebsiteDataStore::parameters and WebsiteDataStore::setResourceLoadStatisticsEnabled. Maybe that would be the right place to force it to false for ephemeral sessions?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211026/629bac19/attachment.htm>
More information about the webkit-unassigned
mailing list