wasm: Avoid making StringView of temporary ByteBuffer

This commit is contained in:
Ben Wiederhake 2021-09-10 23:43:39 +02:00 committed by Idan Horowitz
parent d9c1162a20
commit e118ad3273
Notes: sideshowbarker 2024-07-18 04:17:29 +09:00

View file

@ -399,7 +399,8 @@ int main(int argc, char* argv[])
first = false;
else
argument_builder.append(", "sv);
argument_builder.append(StringView(stream.copy_into_contiguous_buffer()).trim_whitespace());
ByteBuffer buffer = stream.copy_into_contiguous_buffer();
argument_builder.append(StringView(buffer).trim_whitespace());
}
dbgln("[wasm runtime] Stub function {} was called with the following arguments: {}", name, argument_builder.to_string());
Vector<Wasm::Value> result;