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

Unified Diff: mojo/public/cpp/bindings/tests/validation_unittest.cc

Issue 1932083002: Mojo: Use new message APIs to reduce copying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 months 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 | « mojo/public/cpp/bindings/tests/connector_unittest.cc ('k') | mojo/public/cpp/system/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/validation_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc
index 066d1086bfd0d23dbf213f2a28c8684991c8b807..792af215194536883f6e1489ec47e25b5614c822 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -155,7 +155,7 @@ bool ReadTestCase(const std::string& test,
message->Initialize(static_cast<uint32_t>(data.size()),
false /* zero_initialized */);
if (!data.empty())
- memcpy(message->buffer()->Allocate(data.size()), &data[0], data.size());
+ memcpy(message->mutable_data(), &data[0], data.size());
message->mutable_handles()->resize(num_handles);
return true;
« no previous file with comments | « mojo/public/cpp/bindings/tests/connector_unittest.cc ('k') | mojo/public/cpp/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698