1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibJS: Replace a few dbg() with dbgln()

This commit is contained in:
Linus Groh 2020-10-04 15:44:40 +01:00 committed by Andreas Kling
parent 123f98201e
commit 5de5af60c1
3 changed files with 11 additions and 11 deletions

View file

@ -285,14 +285,14 @@ void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measure
int time_spent = measurement_timer.elapsed(); int time_spent = measurement_timer.elapsed();
if (print_report) { if (print_report) {
dbg() << "Garbage collection report"; dbgln("Garbage collection report");
dbg() << "============================================="; dbgln("=============================================");
dbg() << " Time spent: " << time_spent << " ms"; dbgln(" Time spent: {} ms", time_spent);
dbg() << " Live cells: " << live_cells << " (" << live_cell_bytes << " bytes)"; dbgln(" Live cells: {} ({} bytes)", live_cells, live_cell_bytes);
dbg() << "Collected cells: " << collected_cells << " (" << collected_cell_bytes << " bytes)"; dbgln("Collected cells: {} ({} bytes)", collected_cells, collected_cell_bytes);
dbg() << " Live blocks: " << m_blocks.size() << " (" << m_blocks.size() * HeapBlock::block_size << " bytes)"; dbgln(" Live blocks: {} ({} bytes)", m_blocks.size(), m_blocks.size() * HeapBlock::block_size);
dbg() << " Freed blocks: " << empty_blocks.size() << " (" << empty_blocks.size() * HeapBlock::block_size << " bytes)"; dbgln(" Freed blocks: {} ({} bytes)", empty_blocks.size(), empty_blocks.size() * HeapBlock::block_size);
dbg() << "============================================="; dbgln("=============================================");
} }
} }

View file

@ -331,7 +331,7 @@ MarkupGenerator::StyleType MarkupGenerator::style_type_for_token(Token token)
case TokenType::Identifier: case TokenType::Identifier:
return StyleType::Identifier; return StyleType::Identifier;
default: default:
dbg() << "Unknown style type for token " << token.name(); dbgln("Unknown style type for token {}", token.name());
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();
} }
} }

View file

@ -255,13 +255,13 @@ void VM::throw_exception(Exception* exception)
#ifdef VM_DEBUG #ifdef VM_DEBUG
if (exception->value().is_object() && exception->value().as_object().is_error()) { if (exception->value().is_object() && exception->value().as_object().is_error()) {
auto& error = static_cast<Error&>(exception->value().as_object()); auto& error = static_cast<Error&>(exception->value().as_object());
dbg() << "Throwing JavaScript Error: " << error.name() << ", " << error.message(); dbgln("Throwing JavaScript Error: {}, {}", error.name(), error.message());
for (ssize_t i = m_call_stack.size() - 1; i >= 0; --i) { for (ssize_t i = m_call_stack.size() - 1; i >= 0; --i) {
auto function_name = m_call_stack[i].function_name; auto function_name = m_call_stack[i].function_name;
if (function_name.is_empty()) if (function_name.is_empty())
function_name = "<anonymous>"; function_name = "<anonymous>";
dbg() << " " << function_name; dbgln(" {}", function_name);
} }
} }
#endif #endif