WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging is crashing
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jun 2017 23:49:00 +0000 (23:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jun 2017 23:49:00 +0000 (23:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173493

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-16
Reviewed by Eric Carlson.

Speculative preventive fix.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218428 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp

index cc21afc..52ef9ed 100644 (file)
@@ -1,3 +1,15 @@
+2017-06-16  Youenn Fablet  <youenn@apple.com>
+
+        WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=173493
+
+        Reviewed by Eric Carlson.
+
+        Speculative preventive fix.
+
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+        (WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):
+
 2017-06-16  Alex Christensen  <achristensen@webkit.org>
 
         Show punycode to user if a URL has dotless i or j followed by diacritic dot
index 98c042f..a5ac0c3 100644 (file)
@@ -990,7 +990,9 @@ RTCRtpParameters LibWebRTCMediaEndpoint::getRTCRtpSenderParameters(RTCRtpSender&
 
 void LibWebRTCMediaEndpoint::gatherStatsForLogging()
 {
-    m_backend->GetStats(this);
+    ASSERT(m_backend);
+    if (m_backend)
+        m_backend->GetStats(this);
 }
 
 void LibWebRTCMediaEndpoint::OnStatsDelivered(const rtc::scoped_refptr<const webrtc::RTCStatsReport>& report)