| Index: third_party/protobuf/src/google/protobuf/generated_message_util.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/generated_message_util.cc b/third_party/protobuf/src/google/protobuf/generated_message_util.cc
|
| index 334051a013e4098afea6eed399a54caae30ac729..c271e5fe62be3b8a7f134961226e279fd2c604fc 100644
|
| --- a/third_party/protobuf/src/google/protobuf/generated_message_util.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/generated_message_util.cc
|
| @@ -48,15 +48,15 @@ double NaN() {
|
| return std::numeric_limits<double>::quiet_NaN();
|
| }
|
|
|
| -const ::std::string* empty_string_;
|
| +ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
|
| GOOGLE_PROTOBUF_DECLARE_ONCE(empty_string_once_init_);
|
|
|
| void DeleteEmptyString() {
|
| - delete empty_string_;
|
| + GetEmptyStringAlreadyInited().~string();
|
| }
|
|
|
| void InitEmptyString() {
|
| - empty_string_ = new string;
|
| + fixed_address_empty_string.DefaultConstruct();
|
| OnShutdown(&DeleteEmptyString);
|
| }
|
|
|
| @@ -79,6 +79,12 @@ int StringSpaceUsedExcludingSelf(const string& str) {
|
|
|
|
|
|
|
| +void MergeFromFail(const char* file, int line) {
|
| + GOOGLE_CHECK(false) << file << ":" << line;
|
| + // Open-source GOOGLE_CHECK(false) is not NORETURN.
|
| + exit(1);
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace protobuf
|
| } // namespace google
|
|
|