1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

Everywhere: Make JSON serialization fallible

This allows us to eliminate a major source of infallible allocation in
the Kernel, as well as lay down the groundwork for OOM fallibility in
userland.
This commit is contained in:
Idan Horowitz 2022-02-24 20:08:48 +02:00 committed by Andreas Kling
parent 6682afb5d4
commit feb00b7105
18 changed files with 837 additions and 592 deletions

View file

@ -488,12 +488,13 @@ public:
Thread::WaitBlockerSet& wait_blocker_set() { return m_wait_blocker_set; }
template<typename Callback>
void for_each_coredump_property(Callback callback) const
ErrorOr<void> for_each_coredump_property(Callback callback) const
{
for (auto const& property : m_coredump_properties) {
if (property.key && property.value)
callback(*property.key, *property.value);
TRY(callback(*property.key, *property.value));
}
return {};
}
ErrorOr<void> set_coredump_property(NonnullOwnPtr<KString> key, NonnullOwnPtr<KString> value);