From 1a7a7fca804afa1cf67f8be5e71092898ba40334 Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Wed, 18 Oct 2017 12:22:18 -0700 Subject: Merge from google internal --- src/google/protobuf/timestamp.pb.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/google/protobuf/timestamp.pb.cc') diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 0525c18d..36e3bb36 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -14,6 +14,10 @@ #include #include #include +// This is a temporary google only hack +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS +#include "third_party/protobuf/version.h" +#endif // @@protoc_insertion_point(includes) namespace google { namespace protobuf { @@ -28,7 +32,11 @@ namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto { void InitDefaultsTimestampImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { void* ptr = &::google::protobuf::_Timestamp_default_instance_; new (ptr) ::google::protobuf::Timestamp(); @@ -159,12 +167,7 @@ Timestamp::~Timestamp() { } void Timestamp::SharedDtor() { - ::google::protobuf::Arena* arena = GetArenaNoVirtual(); - GOOGLE_DCHECK(arena == NULL); - if (arena != NULL) { - return; - } - + GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void Timestamp::ArenaDtor(void* object) { -- cgit v1.2.3