mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00: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:
parent
ededd6aac6
commit
cd5d483bbd
2 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue