mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
Userland: Remove serialize-to-JSON functions only used for Inspector
This commit is contained in:
@@ -2348,32 +2348,6 @@ void Shell::kill_job(Job const* job, int sig)
|
||||
}
|
||||
}
|
||||
|
||||
ErrorOr<void> Shell::save_to(JsonObject& object)
|
||||
{
|
||||
Core::Object::save_to(object);
|
||||
object.set("working_directory", cwd);
|
||||
object.set("username", username);
|
||||
object.set("user_home_path", home);
|
||||
object.set("user_id", uid);
|
||||
object.set("directory_stack_size", directory_stack.size());
|
||||
object.set("cd_history_size", cd_history.size());
|
||||
|
||||
// Jobs.
|
||||
JsonArray job_objects;
|
||||
for (auto& job_entry : jobs) {
|
||||
JsonObject job_object;
|
||||
job_object.set("pid", job_entry.value->pid());
|
||||
job_object.set("pgid", job_entry.value->pgid());
|
||||
job_object.set("running_time", job_entry.value->timer().elapsed());
|
||||
job_object.set("command", job_entry.value->cmd());
|
||||
job_object.set("is_running_in_background", job_entry.value->is_running_in_background());
|
||||
TRY(job_objects.append(move(job_object)));
|
||||
}
|
||||
object.set("jobs", move(job_objects));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void Shell::possibly_print_error() const
|
||||
{
|
||||
switch (m_error) {
|
||||
|
||||
Reference in New Issue
Block a user