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

LibWasm: Port Wasm::Printer to Core::Stream

This commit is contained in:
Tim Schumacher 2023-01-21 10:29:21 +01:00 committed by Ali Mohammad Pur
parent 4bad4dc8d5
commit 409fb0fe79
4 changed files with 17 additions and 19 deletions

View file

@ -87,8 +87,7 @@ void Configuration::dump_stack()
{
auto print_value = []<typename... Ts>(CheckedFormatString<Ts...> format, Ts... vs) {
Core::Stream::AllocatingMemoryStream memory_stream;
Core::Stream::WrapInAKOutputStream wrapped_memory_stream { memory_stream };
Printer { wrapped_memory_stream }.print(vs...);
Printer { memory_stream }.print(vs...);
auto buffer = ByteBuffer::create_uninitialized(memory_stream.used_buffer_size()).release_value_but_fixme_should_propagate_errors();
memory_stream.read_entire_buffer(buffer).release_value_but_fixme_should_propagate_errors();
dbgln(format.view(), StringView(buffer).trim_whitespace());