Bug 170081 - Tighten RTCDatachannel creation and parameter getters
Summary: Tighten RTCDatachannel creation and parameter getters
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: youenn fablet
URL:
Keywords:
Depends on:
Blocks: 169662
  Show dependency treegraph
 
Reported: 2017-03-24 15:58 PDT by youenn fablet
Modified: 2017-03-27 11:13 PDT (History)
4 users (show)

See Also:


Attachments
Patch (15.31 KB, patch)
2017-03-24 16:00 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (15.22 KB, patch)
2017-03-27 10:30 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-03-24 15:58:35 PDT
Tighten RTCDatachannel creation and parameter getters
Comment 1 youenn fablet 2017-03-24 16:00:47 PDT
Created attachment 305330 [details]
Patch
Comment 2 Eric Carlson 2017-03-24 16:24:23 PDT
Comment on attachment 305330 [details]
Patch

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

> Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:335
> +    if (options.negotiated && !options.negotiated.value() && (label.length() > 65535 || options.protocol.length() > 65535))

USHRT_MAX?

> Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:341
> +    if (options.id && options.id.value() > 65534)

">= USHRT_MAX"? If not, a named constant would be nice to make it obvious what this limit represents.
Comment 3 Eric Carlson 2017-03-24 16:24:47 PDT
Comment on attachment 305330 [details]
Patch

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

> LayoutTests/webrtc/datachannel/basic.html:203
> +
> +

Nit: extra blank line.
Comment 4 youenn fablet 2017-03-24 16:51:41 PDT
Thanks for the review.
The values are literally from the spec, I am not sure it is worth moving away from the spec
Comment 5 youenn fablet 2017-03-27 10:30:16 PDT
Created attachment 305481 [details]
Patch for landing
Comment 6 youenn fablet 2017-03-27 10:30:51 PDT
Thanks for the review.

(In reply to Eric Carlson from comment #3)
> Comment on attachment 305330 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=305330&action=review
> 
> > LayoutTests/webrtc/datachannel/basic.html:203
> > +
> > +
> 
> Nit: extra blank line.

Done
Comment 7 WebKit Commit Bot 2017-03-27 11:13:23 PDT
Comment on attachment 305481 [details]
Patch for landing

Clearing flags on attachment: 305481

Committed r214421: <http://trac.webkit.org/changeset/214421>
Comment 8 WebKit Commit Bot 2017-03-27 11:13:27 PDT
All reviewed patches have been landed.  Closing bug.