Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: test/cctest/wasm/test-run-wasm-module.cc

Issue 2494603002: [wasm] cctest - explicit WriteOneByte null termination opt-out (Closed)
Patch Set: fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-module.cc
diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
index a9694b4882eda999d762482112fb09adb5d4bd36..4345a35894a33113c36da71be59ceb741b8a429a 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698