Bug 158190

Summary: WebRTC: Imlement MediaEndpointPeerConnection::setLocalDescription()
Product: WebKit Reporter: Adam Bergkvist <adam.bergkvist>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 143211    
Attachments:
Description Flags
Proposed patch
eric.carlson: review+
Patch for landing none

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>