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

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

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Update to new HEAD (b7632464b4) + restore GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER Created 4 years, 1 month 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/test_util.cc
diff --git a/third_party/protobuf/src/google/protobuf/test_util.cc b/third_party/protobuf/src/google/protobuf/test_util.cc
index 07aa1d7781b55459768c96ca7fbae85fe10ffd36..658c8ee285fbd18b975d94b27ffe64b37768458f 100644
--- a/third_party/protobuf/src/google/protobuf/test_util.cc
+++ b/third_party/protobuf/src/google/protobuf/test_util.cc
@@ -3332,7 +3332,11 @@ void TestUtil::ReflectionTester::ExpectMessagesReleasedViaReflection(
break;
case NOT_NULL:
EXPECT_TRUE(released != NULL);
- EXPECT_EQ(&sub_message, released);
+ if (message->GetArena() == NULL) {
+ // released message must be same as sub_message if source message is
+ // not on arena.
+ EXPECT_EQ(&sub_message, released);
+ }
break;
case CAN_BE_NULL:
break;

Powered by Google App Engine
This is Rietveld 408576698