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

Unified Diff: third_party/protobuf/src/google/protobuf/wire_format_lite.cc

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 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: third_party/protobuf/src/google/protobuf/wire_format_lite.cc
diff --git a/third_party/protobuf/src/google/protobuf/wire_format_lite.cc b/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
index f2517074696e9958a15e9443e585a625627acab5..5a8857eddc2a13d5aa9360b2d213b563266ffa4a 100644
--- a/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
+++ b/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
@@ -61,7 +61,7 @@ const int WireFormatLite::kMessageSetMessageTag;
#endif
// IBM xlC requires prefixing constants with WireFormatLite::
-const int WireFormatLite::kMessageSetItemTagsSize =
+const size_t WireFormatLite::kMessageSetItemTagsSize =
io::CodedOutputStream::StaticVarintSize32<
WireFormatLite::kMessageSetItemStartTag>::value +
io::CodedOutputStream::StaticVarintSize32<
@@ -466,7 +466,8 @@ void WireFormatLite::WriteGroupMaybeToArray(int field_number,
const int size = value.GetCachedSize();
uint8* target = output->GetDirectBufferForNBytesAndAdvance(size);
if (target != NULL) {
- uint8* end = value.SerializeWithCachedSizesToArray(target);
+ uint8* end = value.InternalSerializeWithCachedSizesToArray(
+ output->IsSerializationDeterministic(), target);
GOOGLE_DCHECK_EQ(end - target, size);
} else {
value.SerializeWithCachedSizes(output);
@@ -482,7 +483,8 @@ void WireFormatLite::WriteMessageMaybeToArray(int field_number,
output->WriteVarint32(size);
uint8* target = output->GetDirectBufferForNBytesAndAdvance(size);
if (target != NULL) {
- uint8* end = value.SerializeWithCachedSizesToArray(target);
+ uint8* end = value.InternalSerializeWithCachedSizesToArray(
+ output->IsSerializationDeterministic(), target);
GOOGLE_DCHECK_EQ(end - target, size);
} else {
value.SerializeWithCachedSizes(output);

Powered by Google App Engine
This is Rietveld 408576698