mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 11:55:12 +00:00
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.
This commit is contained in:
parent
6f992d784f
commit
905065f8c8
5 changed files with 8 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue