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

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

Issue 1524613002: [mojo] Use base::Pickle for Message storage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 f3ff9abc21b896146c261310ab9041a555d4ac14..b9799c4e96695074341141ebbae5a187f4806fbf 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -150,7 +150,7 @@ bool ReadTestCase(const std::string& test,
message->AllocUninitializedData(static_cast<uint32_t>(data.size()));
if (!data.empty())
- memcpy(message->mutable_data(), &data[0], data.size());
+ memcpy(message->buffer()->Allocate(data.size()), &data[0], data.size());
message->mutable_handles()->resize(num_handles);
return true;
« mojo/public/cpp/bindings/lib/pickle_buffer.cc ('K') | « mojo/public/cpp/bindings/message.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698