WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
188110
[GTK] API test /webkit/WebKitFaviconDatabase/get-favicon often times out
https://bugs.webkit.org/show_bug.cgi?id=188110
Summary
[GTK] API test /webkit/WebKitFaviconDatabase/get-favicon often times out
Michael Catanzaro
Reported
2018-07-27 12:21:31 PDT
API test /webkit/WebKitFaviconDatabase/favicon-database-test sometimes times out.
Attachments
Add attachment
proposed patch, testcase, etc.
Adrian Perez
Comment 1
2026-03-20 03:08:37 PDT
I've been looking a bit at this. The issue is in this bit inside the test function: test->waitUntilLoadFinishedAndFaviconChanged(); test->waitUntilFaviconURIChanged(); // <-- timeout due to this not returning From the looks of it, the favicon URI has already been changed *before* the call to waitUntilFaviconURIChanged(), as a consequence of the previous actions, and then there is nothing to wait. I'll double check my hypothesis, and in that case rewriting the function to check whether the change has already happened and avoiding spinning the main loop in that case should be enough.
Adrian Perez
Comment 2
2026-03-20 03:16:18 PDT
(In reply to Adrian Perez from
comment #1
)
> From the looks of it, the favicon URI has already been changed *before* the call > to waitUntilFaviconURIChanged(), as a consequence of the previous actions, and > then there is nothing to wait.
Confirmed, this is exactly what is happening. We need to make the checks more robust, and if the favicon URI has already changed *before* trying to wait, skip the wait and plow ahead.
Adrian Perez
Comment 3
2026-03-20 05:32:08 PDT
(In reply to Adrian Perez from
comment #2
)
> (In reply to Adrian Perez from
comment #1
) > > > From the looks of it, the favicon URI has already been changed *before* the call > > to waitUntilFaviconURIChanged(), as a consequence of the previous actions, and > > then there is nothing to wait. > > Confirmed, this is exactly what is happening. We need to make the checks more > robust, and if the favicon URI has already changed *before* trying to wait, > skip > the wait and plow ahead.
Scratch that. What is really happening is that this is testing the case in which a page has *no favicon*: WebKit will try to load "/favicon.ico" as fallback, and the test server returns HTTP 404 Not Found... and therefore it makes sense that the WebKitFaviconDatabase:favicon-changed signal never gets emitted, because a favicon was never loaded for that page. I think it makes sense that the :favicon-changed signal is NOT emitted if the icon could not be loaded. Reading the API documentation, there is an implicit expectation that the favicon *will be available* if the :favicon-changed signal was emitted: “This signal is emitted when the favicon URI of page_uri has been changed to favicon_uri in the database. You can connect to this signal and call webkit_favicon_database_get_favicon() to get the favicon.” --
https://webkitgtk.org/reference/webkitgtk/2.52.0/signal.FaviconDatabase.favicon-changed.html
If the signal was emitted, the user of the API would expect to be able to fetch the favicon but it would not be available (as it was not loaded!). Therefore, the current behaviour makes sense: if there is no favicon image because it cannot be loaded, then there is no :favicon-changed emission. No idea how this test had the chance to ever working properly. I suppose it worked by chance at some point.
Adrian Perez
Comment 4
2026-03-20 06:26:41 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/61000
EWS
Comment 5
2026-03-20 15:34:04 PDT
Committed
309642@main
(dd71161da413): <
https://commits.webkit.org/309642@main
> Reviewed commits have been landed. Closing PR #61000 and removing active labels.
Claudio Saavedra
Comment 6
2026-03-21 00:03:52 PDT
The test is failing in the API bots: /webkit/WebKitFaviconDatabase/get-favicon: Leaked objects: WebKitFaviconDatabase(0x55c9a31f24b0 - 1 left) FAIL
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug