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

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

Issue 2600753002: Reverts third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: 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/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 683a9d5c738c7c81ce9d2d03dc284844d773ed89..334051a013e4098afea6eed399a54caae30ac729 100644
--- a/third_party/protobuf/src/google/protobuf/generated_message_util.cc
+++ b/third_party/protobuf/src/google/protobuf/generated_message_util.cc
@@ -48,13 +48,15 @@ double NaN() {
return std::numeric_limits<double>::quiet_NaN();
}
-ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
+const ::std::string* empty_string_;
GOOGLE_PROTOBUF_DECLARE_ONCE(empty_string_once_init_);
-void DeleteEmptyString() { fixed_address_empty_string.Shutdown(); }
+void DeleteEmptyString() {
+ delete empty_string_;
+}
void InitEmptyString() {
- fixed_address_empty_string.DefaultConstruct();
+ empty_string_ = new string;
OnShutdown(&DeleteEmptyString);
}
@@ -77,10 +79,6 @@ int StringSpaceUsedExcludingSelf(const string& str) {
-void InitProtobufDefaults() {
- GetEmptyString();
-}
-
} // namespace internal
} // namespace protobuf
} // namespace google
« no previous file with comments | « third_party/protobuf/src/google/protobuf/generated_message_util.h ('k') | third_party/protobuf/src/google/protobuf/has_bits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698