Commit 5657433e authored by mtrofin's avatar mtrofin Committed by Commit bot

[wasm] cctest - explicit WriteOneByte null termination opt-out

Turns out WriteOneByte writes '\0' by default.

BUG=

Review-Url: https://codereview.chromium.org/2494603002
Cr-Commit-Position: refs/heads/master@{#40873}
parent 9e07c96f
...@@ -328,8 +328,9 @@ class WasmSerializationTest { ...@@ -328,8 +328,9 @@ class WasmSerializationTest {
v8::Local<v8::String> uncompiled_bytes = v8::Local<v8::String> uncompiled_bytes =
v8_compiled_module->GetWasmWireBytes(); v8_compiled_module->GetWasmWireBytes();
bytes_size = static_cast<size_t>(uncompiled_bytes->Length()); bytes_size = static_cast<size_t>(uncompiled_bytes->Length());
bytes = zone()->NewArray<uint8_t>(uncompiled_bytes->Length()); bytes = zone()->NewArray<uint8_t>(bytes_size);
uncompiled_bytes->WriteOneByte(bytes); uncompiled_bytes->WriteOneByte(bytes, 0, uncompiled_bytes->Length(),
v8::String::NO_NULL_TERMINATION);
// keep alive data_ until the end // keep alive data_ until the end
data_ = v8_compiled_module->Serialize(); data_ = v8_compiled_module->Serialize();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment