Source/WebCore: Fix and test for missing return statement
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 17:05:28 +0000 (17:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 17:05:28 +0000 (17:05 +0000)
RTCPeerConnection.getStats() failed when remote stats were instantiated.
https://bugs.webkit.org/show_bug.cgi?id=109292

Patch by Harald Alvestrand <hta@google.com> on 2013-02-08
Reviewed by Adam Barth.

Tested by extending the existing mock's behaviour.

* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::addElement):

Tools: Fix and test for missing return

RTCPeerConnection.getStats() fails when remote stats are instantiated.
https://bugs.webkit.org/show_bug.cgi?id=109292

Patch by Harald Alvestrand <hta@google.com> on 2013-02-08
Reviewed by Adam Barth.

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::getStats):

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

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCStatsReport.cpp
Tools/ChangeLog
Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp

index 769667167749fc160a9db52f1e6076ff0ea2ba37..d7e45369af43e42434d8fb684caadc8596ef2e71 100644 (file)
@@ -1,3 +1,17 @@
+2013-02-08  Harald Alvestrand  <hta@google.com>
+
+        Fix and test for missing return statement
+
+        RTCPeerConnection.getStats() failed when remote stats were instantiated.
+        https://bugs.webkit.org/show_bug.cgi?id=109292
+
+        Reviewed by Adam Barth.
+
+        Tested by extending the existing mock's behaviour.
+
+        * Modules/mediastream/RTCStatsReport.cpp:
+        (WebCore::RTCStatsReport::addElement):
+
 2013-02-08  Anton Vayvod  <avayvod@chromium.org>
 
         [Text Autosizing] Split isAutosizingCluster into three independent checks
index 4ce92ff2a42aa1868b3fafbc0b90d0fac774c3d5..a5616d59e9fa02c8c23e98bd8f5568e53aaa44c2 100644 (file)
@@ -44,6 +44,7 @@ void RTCStatsReport::addElement(bool isLocal, double timestamp)
     if (isLocal) {
         ASSERT(!m_local);
         m_local = RTCStatsElement::create(timestamp);
+        return;
     }
     ASSERT(!m_remote);
     m_remote = RTCStatsElement::create(timestamp);
index 9b236d42617e5b7406971ac30624aef93f4e6048..f69ccdd1ac6664e755359c9f862fa8c57edbedf8 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-08  Harald Alvestrand  <hta@google.com>
+
+        Fix and test for missing return
+
+        RTCPeerConnection.getStats() fails when remote stats are instantiated.
+        https://bugs.webkit.org/show_bug.cgi?id=109292
+
+        Reviewed by Adam Barth.
+
+        * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+        (MockWebRTCPeerConnectionHandler::getStats):
+
 2013-02-08  Tommy Widenflycht  <tommyw@google.com>
 
         MediaStream API: Removing the deprecated WebMediaStreamDescriptor and WebMediaStreamComponent shims
index 04cbeec052ebfe46b0887903c4aad89f10bbcb44..40387d35d8e5f34a9e923959f642cf7d28d664d1 100644 (file)
@@ -282,6 +282,8 @@ void MockWebRTCPeerConnectionHandler::getStats(const WebRTCStatsRequest& request
             reportIndex = response.addReport();
             response.addElement(reportIndex, true, currentDate);
             response.addStatistic(reportIndex, true, "type", "video");
+            // We add an empty remote report element.
+            response.addElement(reportIndex, false, currentDate);
         }
     }
     postTask(new RTCStatsRequestSucceededTask(this, request, response));