1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:35:08 +00:00

Kernel: Use try_make_weak_ptr() instead of make_weak_ptr()

This commit is contained in:
Idan Horowitz 2022-02-13 21:21:14 +02:00 committed by Andreas Kling
parent 98c20b65cc
commit c8ab7bde3b
7 changed files with 19 additions and 18 deletions

View file

@ -359,7 +359,7 @@ void Thread::unblock_from_blocker(Blocker& blocker)
unblock();
};
if (Processor::current_in_irq() != 0) {
Processor::deferred_call_queue([do_unblock = move(do_unblock), self = make_weak_ptr()]() {
Processor::deferred_call_queue([do_unblock = move(do_unblock), self = try_make_weak_ptr().release_value_but_fixme_should_propagate_errors()]() {
if (auto this_thread = self.strong_ref())
do_unblock();
});