Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9d3acc999bfd920472d36b6025588fcd50cd71bb
https://github.com/WebKit/WebKit/commit/9d3acc999bfd920472d36b6025588fcd50cd71bb
Author: Adrian Perez de Castro <[email protected]>
Date: 2026-08-26 (Wed, 26 Aug 2026)
Changed paths:
M Source/WebKit/UIProcess/API/glib/IconDatabase.cpp
Log Message:
-----------
[GTK][WPE] IconDatabase should use current timestamp when inserting new icons
https://bugs.webkit.org/show_bug.cgi?id=322572
Reviewed by Carlos Garcia Campos.
Use the current Unix epoch as timestamp when adding a new item in
IconDatabase::addIcon(). Another option that was considered was changing
the database schema to include "default (unixepoch())" in the timestamp
column; but it was discarded to avoid changing the schema version.
Prior to the fix, using zero as timestamp when adding a new page icon in
IconDatabase::addIcon() made it always look as if it were immediately
expired:
- IconDatabase::iconIDForIconURL() would flag icons as expired,
resulting in them being re-downloaded.
- IconDatabase::pruneTimerFired() would remove icons from the database
if their timestamp has not been touched, making icons prone to be
removed before they have a chance to be used if the timer kicks in
before their first use.
Unfortunately writing a proper test for this would be tricky it would
need access to the IconDatabase internals, and testing would be slow
because it would need a 10s pause for every test case.
* Source/WebKit/UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::addIcon):
Canonical link: https://commits.webkit.org/319858@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications