LibCore: Stop atomically ref-counting EventReceiver

Inheriting from AtomicRefCounted and Weakable is asking for misuse of
WeakPtr to result in TOCTOU-caused UAFs.

In order to ensure we're not misusing EventReceiver across threads, I
ran test-web and some sites with a temporary hack to verify that ref()s
and unref()s are always called from the same thread on the class.
This commit is contained in:
Zaggy1024 2026-02-26 23:03:35 -06:00 committed by Gregory Bertilson
parent d6ff027593
commit 8c96f7b3aa

View file

@ -37,7 +37,7 @@ public: \
}
class CORE_API EventReceiver
: public AtomicRefCounted<EventReceiver>
: public RefCounted<EventReceiver>
, public Weakable<EventReceiver> {
// NOTE: No C_OBJECT macro for Core::EventReceiver itself.