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

Kernel: Don't take LexicalPath as argument

LexicalPath is a big and heavy class that's really meant as a helper
for extracting parts of a path, not for storage or passing around.
Instead, pass paths around as strings and use LexicalPath locally
as needed.
This commit is contained in:
Andreas Kling 2020-12-15 11:17:01 +01:00
parent bcabbbda8b
commit ff8bf4db8d
4 changed files with 13 additions and 14 deletions

View file

@ -588,7 +588,7 @@ void Process::finalize()
#endif
if (is_profiling()) {
auto coredump = CoreDump::create(*this, LexicalPath { String::format("/tmp/profiler_coredumps/%d", pid().value()) });
auto coredump = CoreDump::create(*this, String::formatted("/tmp/profiler_coredumps/{}", pid().value()));
if (coredump) {
coredump->write();
} else {
@ -598,8 +598,8 @@ void Process::finalize()
if (m_should_dump_core) {
dbgln("Generating coredump for pid: {}", m_pid.value());
auto coredump_path = String::format("/tmp/coredump/%s_%d_%u", name().characters(), m_pid.value(), RTC::now());
auto coredump = CoreDump::create(*this, LexicalPath { coredump_path });
auto coredump_path = String::formatted("/tmp/coredump/{}_{}_{}", name(), m_pid.value(), RTC::now());
auto coredump = CoreDump::create(*this, coredump_path);
if (coredump) {
coredump->write();
} else {