mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
AK: Don't unlink intrusive list elements in the destructor
Removing the element from the intrusive linked list might not be safe if doing so requires a lock. Instead this is something the caller should have done so let's verify instead that we're not on any lists.
This commit is contained in:
parent
c46ab4fbb9
commit
96b75af5d1
Notes:
sideshowbarker
2024-07-18 17:43:33 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/96b75af5d13 Pull-request: https://github.com/SerenityOS/serenity/pull/7301 Reviewed-by: https://github.com/bgianfo ✅
@ -320,8 +320,7 @@ namespace Detail {
|
||||
template<typename T, typename Container>
|
||||
inline IntrusiveListNode<T, Container>::~IntrusiveListNode()
|
||||
{
|
||||
if (m_storage)
|
||||
remove();
|
||||
VERIFY(!is_in_list());
|
||||
}
|
||||
|
||||
template<typename T, typename Container>
|
||||
|
Loading…
Reference in New Issue
Block a user