diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-07 18:21:37 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-07 22:16:25 +0200 |
commit | 905065f8c8dd4459f843fc8eb5faa87b64e42b2e (patch) | |
tree | f4bdbf01dc519338be6542babce0c0163784f2d7 /Kernel/Process.cpp | |
parent | 6f992d784f986d8ecf95eb3ac455310fa2222eb3 (diff) | |
download | serenity-905065f8c8dd4459f843fc8eb5faa87b64e42b2e.zip |
Kernel: Make PerformanceEventBuffer::to_json() return a KResult
There's a ton of things inside to_json() that could go wrong but we
don't know about it yet. One step at a time.
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index a1ce03fe9d..fb512ea546 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -581,7 +581,7 @@ bool Process::dump_perfcore() return false; } auto builder = builder_or_error.release_value(); - if (!m_perf_event_buffer->to_json(builder)) { + if (m_perf_event_buffer->to_json(builder).is_error()) { dbgln("Failed to generate perfcore for pid {}: Could not serialize performance events to JSON.", pid().value()); return false; } |