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

LibWasm: Avoid making StringView of temporary ByteBuffer

This commit is contained in:
Ben Wiederhake 2021-09-10 23:43:11 +02:00 committed by Idan Horowitz
parent 2223f22590
commit 6c8eea6f5e

View file

@ -88,7 +88,8 @@ void Configuration::dump_stack()
{
DuplexMemoryStream memory_stream;
Printer { memory_stream }.print(vs...);
dbgln(format.view(), StringView(memory_stream.copy_into_contiguous_buffer()).trim_whitespace());
ByteBuffer buffer = memory_stream.copy_into_contiguous_buffer();
dbgln(format.view(), StringView(buffer).trim_whitespace());
};
for (auto const& entry : stack().entries()) {
entry.visit(