Bug 1531904 - Part 1: webidl updates. r=jib,smaug
authorByron Campen [:bwc] <docfaraday@gmail.com>
Tue, 16 Apr 2019 16:38:13 +0000
changeset 469706 86d62da0f2a8
parent 469705 eb1553deea2f
child 469707 08102fb37153
push id35879
push usernerli@mozilla.com
push dateTue, 16 Apr 2019 22:01:48 +0000
treeherdermozilla-central@12a60898fdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, smaug
bugs1531904
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1531904 - Part 1: webidl updates. r=jib,smaug Differential Revision: https://phabricator.services.mozilla.com/D26770
dom/webidl/RTCDataChannel.webidl
dom/webidl/RTCPeerConnection.webidl
--- a/dom/webidl/RTCDataChannel.webidl
+++ b/dom/webidl/RTCDataChannel.webidl
@@ -12,19 +12,22 @@ enum RTCDataChannelState {
 enum RTCDataChannelType {
   "arraybuffer",
   "blob"
 };
 
 interface RTCDataChannel : EventTarget
 {
   readonly attribute DOMString label;
+  readonly attribute boolean ordered;
   readonly attribute boolean reliable;
   readonly attribute unsigned short? maxPacketLifeTime;
   readonly attribute unsigned short? maxRetransmits;
+  readonly attribute USVString protocol;
+  readonly attribute unsigned short? id;
   readonly attribute RTCDataChannelState readyState;
   readonly attribute unsigned long bufferedAmount;
   attribute unsigned long bufferedAmountLowThreshold;
   attribute EventHandler onopen;
   attribute EventHandler onerror;
   attribute EventHandler onclose;
   void close();
   attribute EventHandler onmessage;
@@ -34,16 +37,8 @@ interface RTCDataChannel : EventTarget
   void send(DOMString data);
   [Throws]
   void send(Blob data);
   [Throws]
   void send(ArrayBuffer data);
   [Throws]
   void send(ArrayBufferView data);
 };
-
-// Mozilla extensions.
-partial interface RTCDataChannel
-{
-  readonly attribute DOMString protocol;
-  readonly attribute boolean ordered;
-  readonly attribute unsigned short id;
-};
--- a/dom/webidl/RTCPeerConnection.webidl
+++ b/dom/webidl/RTCPeerConnection.webidl
@@ -45,20 +45,23 @@ enum mozPacketDumpType {
 
 callback mozPacketCallback = void (unsigned long level,
                                    mozPacketDumpType type,
                                    boolean sending,
                                    ArrayBuffer packet);
 
 dictionary RTCDataChannelInit {
   boolean        ordered = true;
+  [EnforceRange]
   unsigned short maxPacketLifeTime;
+  [EnforceRange]
   unsigned short maxRetransmits;
   DOMString      protocol = "";
   boolean        negotiated = false;
+  [EnforceRange]
   unsigned short id;
 
   // These are deprecated due to renaming in the spec, but still supported for Fx53
   unsigned short maxRetransmitTime;
 };
 
 dictionary RTCOfferAnswerOptions {
 //  boolean voiceActivityDetection = true; // TODO: support this (Bug 1184712)