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

LibJS: Make ExecutionContext::function_name a GCPtr<PrimitiveString>

This required setting things up so that all function objects can plop
a PrimitiveString there instead of an AK string.

This is a step towards making ExecutionContext easier to allocate.
This commit is contained in:
Andreas Kling 2023-11-27 13:38:19 +01:00
parent eda2a6d9f7
commit 845da3901d
9 changed files with 34 additions and 16 deletions

View file

@ -749,9 +749,9 @@ void VM::dump_backtrace() const
auto& frame = m_execution_context_stack[i];
if (frame->instruction_stream_iterator.has_value() && frame->instruction_stream_iterator->source_code()) {
auto source_range = frame->instruction_stream_iterator->source_range().realize();
dbgln("-> {} @ {}:{},{}", frame->function_name, source_range.filename(), source_range.start.line, source_range.start.column);
dbgln("-> {} @ {}:{},{}", frame->function_name ? frame->function_name->utf8_string() : ""_string, source_range.filename(), source_range.start.line, source_range.start.column);
} else {
dbgln("-> {}", frame->function_name);
dbgln("-> {}", frame->function_name ? frame->function_name->utf8_string() : ""_string);
}
}
}