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: webrtc/api/rtcstatscollector.h

Issue 2583613003: Fix segfault when PeerConnection is destroyed during stats collection. (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: webrtc/api/rtcstatscollector.h
diff --git a/webrtc/api/rtcstatscollector.h b/webrtc/api/rtcstatscollector.h
index c32d65f2460a83447946b70430b5bf1bc05b5074..cd8ee0ff471963809fb1be4e54ca49abd80e603b 100644
--- a/webrtc/api/rtcstatscollector.h
+++ b/webrtc/api/rtcstatscollector.h
@@ -70,6 +70,10 @@ class RTCStatsCollector : public virtual rtc::RefCountInterface,
// calling |GetStatsReport| guarantees fresh stats.
void ClearCachedStatsReport();
+ // If there are any |GetStatsReport| requests in-flight, waits until it has
hbos 2016/12/16 13:49:35 nit: Will update comment to speak in singular, thi
+ // been completed. Must be called on the signaling thread.
+ void WaitForPendingRequest();
+
protected:
RTCStatsCollector(PeerConnection* pc, int64_t cache_lifetime_us);

Powered by Google App Engine
This is Rietveld 408576698