Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e284abe8a7fafee62744ba4ba06215b7e0576011
https://github.com/WebKit/WebKit/commit/e284abe8a7fafee62744ba4ba06215b7e0576011
Author: Claudio Saavedra <[email protected]>
Date: 2026-03-30 (Mon, 30 Mar 2026)
Changed paths:
M Source/WebKit/UIProcess/API/glib/IconDatabase.cpp
Log Message:
-----------
[GLIB] WebKit::IconDatabase::~IconDatabase(): ASSERTION FAILED:
isMainRunLoop()
https://bugs.webkit.org/show_bug.cgi?id=311112
Reviewed by Adrian Perez de Castro.
The destructor for IconDatabase checks that it's being invoked from the main
loop
thread. But the many worker's lambdas in IconDatabase are capturing a strong
reference
to the object which, depending on timing, can be the last one alive,
so that when the lambda goes out of scope, it can end up destroying the object
from
the worker thread and hitting the assertion in the destructor.
This is particularly crashy for the worker lambda in
IconDatabase::loadIconsForPageURL().
We can fix this here by moving the protectedThis reference instead of creating
a new one,
that way the ownership of the reference goes back to the main loop thread.
This needs to be fixed for other methods in this class, but we will do that
in a subsequent patch as other lambda uses don't need to capture the icon
database object so the fix can be different.
* Source/WebKit/UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::loadIconsForPageURL):
Canonical link: https://commits.webkit.org/310242@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications