diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc index 01409ed320..2bf026eabb 100644 --- a/pc/rtc_stats_integrationtest.cc +++ b/pc/rtc_stats_integrationtest.cc @@ -1285,6 +1285,20 @@ TEST_F(RTCStatsIntegrationTest, GetStatsReferencedIds) { } } } + +TEST_F(RTCStatsIntegrationTest, GetStatsContainsNoDuplicateMembers) { + StartCall(); + + rtc::scoped_refptr report = GetStatsFromCallee(); + for (const RTCStats& stats : *report) { + std::set member_names; + for (const auto* member : stats.Members()) { + EXPECT_TRUE(member_names.find(member->name()) == member_names.end()) + << member->name() << " is a duplicate!"; + member_names.insert(member->name()); + } + } +} #endif // WEBRTC_HAVE_SCTP } // namespace diff --git a/stats/rtcstats_objects.cc b/stats/rtcstats_objects.cc index 6b811bae65..dcd2aeb776 100644 --- a/stats/rtcstats_objects.cc +++ b/stats/rtcstats_objects.cc @@ -894,10 +894,6 @@ RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {} WEBRTC_RTCSTATS_IMPL( RTCRemoteInboundRtpStreamStats, RTCReceivedRtpStreamStats, "remote-inbound-rtp", - &ssrc, - &kind, - &transport_id, - &codec_id, &local_id, &round_trip_time, &fraction_lost,