<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebRTC: Update RTCPeerConnection.addTrack() to create (or reuse) an RTCRtpTransceiver"
   href="https://bugs.webkit.org/show_bug.cgi?id=158191#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebRTC: Update RTCPeerConnection.addTrack() to create (or reuse) an RTCRtpTransceiver"
   href="https://bugs.webkit.org/show_bug.cgi?id=158191">bug 158191</a>
              from <span class="vcard"><a class="email" href="mailto:adam.bergkvist&#64;ericsson.com" title="Adam Bergkvist &lt;adam.bergkvist&#64;ericsson.com&gt;"> <span class="fn">Adam Bergkvist</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=158191#c2">comment #2</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=280254&amp;action=diff" name="attach_280254" title="Proposed patch">attachment 280254</a> <a href="attachment.cgi?id=280254&amp;action=edit" title="Proposed patch">[details]</a></span>
&gt; Proposed patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=280254&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=280254&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebCore/Modules/mediastream/RTCPeerConnection.h:67
&gt; &gt; +    Vector&lt;RefPtr&lt;RTCRtpSender&gt;&gt; getSenders() const override { return m_transceiverSet-&gt;getSenders(); }
&gt; &gt; +    Vector&lt;RefPtr&lt;RTCRtpReceiver&gt;&gt; getReceivers() const { return m_transceiverSet-&gt;getReceivers(); }
&gt; 
&gt; Can these return a reference to a const Vector: &quot;const Vector&lt;RefPtr&lt;...&gt;&gt;&amp;&quot;?</span >

Yes they can; and probably should :). createOfferTask uses getSenders() and modifies the resulting vector, but it can create a new vector from the const ref for its special purpose.

<span class="quote">&gt; &gt; Source/WebCore/Modules/mediastream/RTCPeerConnection.h:68
&gt; &gt; +    const Vector&lt;RefPtr&lt;RTCRtpTransceiver&gt;&gt;&amp; getTransceivers() const override { return m_transceiverSet-&gt;list(); }
&gt; 
&gt; Can this be final instead of override?</span >

Seems to work. I'm a bit unsure what the result is being that the entire class is final.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>