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

Unified Diff: google_apis/gcm/engine/connection_handler_impl_unittest.cc

Issue 149073006: Explicit destruction order in gcm_unit_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/connection_handler_impl_unittest.cc
diff --git a/google_apis/gcm/engine/connection_handler_impl_unittest.cc b/google_apis/gcm/engine/connection_handler_impl_unittest.cc
index 70a3660e12f54a1068c3fd6c1e25e6991f353a58..18ebdbf7ef34fa2990aafdb6144bd871eb311edd 100644
--- a/google_apis/gcm/engine/connection_handler_impl_unittest.cc
+++ b/google_apis/gcm/engine/connection_handler_impl_unittest.cc
@@ -49,12 +49,16 @@ const char kDataMsgCategoryLong2[] =
std::string EncodePacket(uint8 tag, const std::string& proto) {
std::string result;
google::protobuf::io::StringOutputStream string_output_stream(&result);
- google::protobuf::io::CodedOutputStream coded_output_stream(
+ {
+ google::protobuf::io::CodedOutputStream coded_output_stream(
&string_output_stream);
- const unsigned char tag_byte[1] = {tag};
- coded_output_stream.WriteRaw(tag_byte, 1);
- coded_output_stream.WriteVarint32(proto.size());
- coded_output_stream.WriteRaw(proto.c_str(), proto.size());
+ const unsigned char tag_byte[1] = { tag };
+ coded_output_stream.WriteRaw(tag_byte, 1);
+ coded_output_stream.WriteVarint32(proto.size());
+ coded_output_stream.WriteRaw(proto.c_str(), proto.size());
+ // ~CodedOutputStream must run before the move constructor at the
+ // return statement. http://crbug.com/338962
+ }
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698