LibThreading: Remove Weakable from Thread
Some checks are pending
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run

Weakable is not thread-safe, so taking a strong reference from a
WeakPtr<Thread> may result in a use-after-free. We don't use this
functionality anywhere anyway, so remove it.
This commit is contained in:
Zaggy1024 2025-09-17 15:53:38 -05:00 committed by Gregory Bertilson
commit fceb73e65a
Notes: github-actions[bot] 2025-09-23 14:59:14 +00:00

View file

@ -43,8 +43,7 @@ enum class ThreadState : u8 {
};
class Thread final
: public AtomicRefCounted<Thread>
, public Weakable<Thread> {
: public AtomicRefCounted<Thread> {
public:
static NonnullRefPtr<Thread> construct(ESCAPING Function<intptr_t()> action, StringView thread_name = {})
{