The vector of mediastreams should be passed via a reference to RTCPeerConnection...
authornael.ouedraogo@crf.canon.fr <nael.ouedraogo@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jun 2016 08:08:43 +0000 (08:08 +0000)
committernael.ouedraogo@crf.canon.fr <nael.ouedraogo@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jun 2016 08:08:43 +0000 (08:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158701

Pass vector of mediastreams by reference.

Reviewed by Youenn Fablet.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTrack):
* Modules/mediastream/RTCPeerConnection.h:

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

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h

index bc14d9e..b2a372f 100644 (file)
@@ -1,3 +1,16 @@
+2016-06-14  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
+
+        The vector of mediastreams should be passed via a reference to RTCPeerConnection::addTrack()
+        https://bugs.webkit.org/show_bug.cgi?id=158701
+
+        Pass vector of mediastreams by reference.
+
+        Reviewed by Youenn Fablet.
+
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::addTrack):
+        * Modules/mediastream/RTCPeerConnection.h:
+
 2016-06-14  Ryosuke Niwa  <rniwa@webkit.org>
 
         Crash inside firstPositionInNode in checkLoadCompleteForThisFrame
index 0c18681..e1d777a 100644 (file)
@@ -100,7 +100,7 @@ RTCPeerConnection::~RTCPeerConnection()
     stop();
 }
 
-RefPtr<RTCRtpSender> RTCPeerConnection::addTrack(Ref<MediaStreamTrack>&& track, Vector<MediaStream*> streams, ExceptionCode& ec)
+RefPtr<RTCRtpSender> RTCPeerConnection::addTrack(Ref<MediaStreamTrack>&& track, const Vector<MediaStream*>& streams, ExceptionCode& ec)
 {
     if (m_signalingState == SignalingState::Closed) {
         ec = INVALID_STATE_ERR;
index ef1587d..f85ec64 100644 (file)
@@ -67,7 +67,7 @@ public:
     const Vector<RefPtr<RTCRtpReceiver>>& getReceivers() const { return m_transceiverSet->getReceivers(); }
     const Vector<RefPtr<RTCRtpTransceiver>>& getTransceivers() const override { return m_transceiverSet->list(); }
 
-    RefPtr<RTCRtpSender> addTrack(Ref<MediaStreamTrack>&&, Vector<MediaStream*>, ExceptionCode&);
+    RefPtr<RTCRtpSender> addTrack(Ref<MediaStreamTrack>&&, const Vector<MediaStream*>&, ExceptionCode&);
     void removeTrack(RTCRtpSender&, ExceptionCode&);
 
     // This enum is mirrored in RTCRtpTransceiver.h