Bug 158190 - WebRTC: Imlement MediaEndpointPeerConnection::setLocalDescription()
Summary: WebRTC: Imlement MediaEndpointPeerConnection::setLocalDescription()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 143211
  Show dependency treegraph
 
Reported: 2016-05-29 01:45 PDT by Adam Bergkvist
Modified: 2016-06-08 00:40 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (37.51 KB, patch)
2016-06-07 11:12 PDT, Adam Bergkvist
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (37.63 KB, patch)
2016-06-07 23:26 PDT, Adam Bergkvist
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bergkvist 2016-05-29 01:45:58 PDT
RTCPeerConnection::setLocalDescription() [1] sets a local description created with createOffer() or createAnswer().

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcpeerconnection-setlocaldescription
Comment 1 Adam Bergkvist 2016-06-07 11:12:41 PDT
Created attachment 280724 [details]
Proposed patch
Comment 2 Eric Carlson 2016-06-07 14:26:14 PDT
Comment on attachment 280724 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=280724&action=review

> Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:161
> +    RefPtr<MediaEndpointSessionConfiguration> configurationSnapshot = internalLocalDescription() ?
> +        internalLocalDescription()->configuration()->clone() : MediaEndpointSessionConfiguration::create();

Nit: it may be worth putting internalLocalDescription() into a local instead of calling it twice.

> Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:258
> +    unsigned previousNumberOfMediaDescriptions = internalLocalDescription() ?
> +        internalLocalDescription()->configuration()->mediaDescriptions().size() : 0;

Ditto.
Comment 3 Adam Bergkvist 2016-06-07 23:26:03 PDT
Created attachment 280775 [details]
Patch for landing
Comment 4 Adam Bergkvist 2016-06-07 23:27:00 PDT
(In reply to comment #2)
> Comment on attachment 280724 [details]
> Proposed patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280724&action=review
> 
> > Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:161
> > +    RefPtr<MediaEndpointSessionConfiguration> configurationSnapshot = internalLocalDescription() ?
> > +        internalLocalDescription()->configuration()->clone() : MediaEndpointSessionConfiguration::create();
> 
> Nit: it may be worth putting internalLocalDescription() into a local instead
> of calling it twice.

Fixed.

> > Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:258
> > +    unsigned previousNumberOfMediaDescriptions = internalLocalDescription() ?
> > +        internalLocalDescription()->configuration()->mediaDescriptions().size() : 0;
> 
> Ditto.

Fixed.
Comment 5 WebKit Commit Bot 2016-06-08 00:35:41 PDT
Comment on attachment 280775 [details]
Patch for landing

Clearing flags on attachment: 280775

Committed r201798: <http://trac.webkit.org/changeset/201798>