<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@ericsson.com" title="Adam Bergkvist <adam.bergkvist@ericsson.com>"> <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">> Comment on <span class=""><a href="attachment.cgi?id=280254&action=diff" name="attach_280254" title="Proposed patch">attachment 280254</a> <a href="attachment.cgi?id=280254&action=edit" title="Proposed patch">[details]</a></span>
> Proposed patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=280254&action=review">https://bugs.webkit.org/attachment.cgi?id=280254&action=review</a>
>
> > Source/WebCore/Modules/mediastream/RTCPeerConnection.h:67
> > + Vector<RefPtr<RTCRtpSender>> getSenders() const override { return m_transceiverSet->getSenders(); }
> > + Vector<RefPtr<RTCRtpReceiver>> getReceivers() const { return m_transceiverSet->getReceivers(); }
>
> Can these return a reference to a const Vector: "const Vector<RefPtr<...>>&"?</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">> > Source/WebCore/Modules/mediastream/RTCPeerConnection.h:68
> > + const Vector<RefPtr<RTCRtpTransceiver>>& getTransceivers() const override { return m_transceiverSet->list(); }
>
> 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>