1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

Kernel: Use KResultOr and TRY() for ThreadTracer

Also make the constructor private, since it's only called by the static
factory function.
This commit is contained in:
Andreas Kling 2021-09-07 14:48:13 +02:00
parent ededd6aac6
commit cd5d483bbd
Notes: sideshowbarker 2024-07-18 04:31:34 +09:00
2 changed files with 3 additions and 6 deletions

View file

@ -785,10 +785,7 @@ void Process::set_tty(TTY* tty)
KResult Process::start_tracing_from(ProcessID tracer)
{
auto thread_tracer = ThreadTracer::create(tracer);
if (!thread_tracer)
return ENOMEM;
m_tracer = move(thread_tracer);
m_tracer = TRY(ThreadTracer::try_create(tracer));
return KSuccess;
}