diff options
author | Tom <tomut@yahoo.com> | 2020-12-29 13:14:21 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-31 00:39:43 +0100 |
commit | 54eeb8ee9a57850aca5056a5834bfb86a210bf1a (patch) | |
tree | 62bc71286635f0258b86aac7d2f839c2a88d56ed /Libraries/LibGUI/ResizeCorner.cpp | |
parent | 3e00e3da7246f588a9839105eaaf680aaccba21d (diff) | |
download | serenity-54eeb8ee9a57850aca5056a5834bfb86a210bf1a.zip |
AK: Fix a race condition with WeakPtr<T>::strong_ref and destruction
Since RefPtr<T> decrements the ref counter to 0 and after that starts
destructing the object, there is a window where the ref count is 0
and the weak references have not been revoked.
Also change WeakLink to be able to obtain a strong reference
concurrently and block revoking instead, which should happen a lot
less often.
Fixes a problem observed in #4621
Diffstat (limited to 'Libraries/LibGUI/ResizeCorner.cpp')
0 files changed, 0 insertions, 0 deletions