[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}
This commit is contained in:
parent
9e07c96fed
commit
5657433e57
@ -328,8 +328,9 @@ class WasmSerializationTest {
|
||||
v8::Local<v8::String> uncompiled_bytes =
|
||||
v8_compiled_module->GetWasmWireBytes();
|
||||
bytes_size = static_cast<size_t>(uncompiled_bytes->Length());
|
||||
bytes = zone()->NewArray<uint8_t>(uncompiled_bytes->Length());
|
||||
uncompiled_bytes->WriteOneByte(bytes);
|
||||
bytes = zone()->NewArray<uint8_t>(bytes_size);
|
||||
uncompiled_bytes->WriteOneByte(bytes, 0, uncompiled_bytes->Length(),
|
||||
v8::String::NO_NULL_TERMINATION);
|
||||
// keep alive data_ until the end
|
||||
data_ = v8_compiled_module->Serialize();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user