Bug 1464917 - Add maxPacketLifeTime and maxRetransmits to RTCDatachannel.webidl; r=baku
authorDan Minor <dminor@mozilla.com>
Thu, 31 May 2018 12:50:55 -0400
changeset 421122 160f7211a241
parent 421121 2782fc090894
child 421123 aadb40090d20
push id34088
push userdluca@mozilla.com
push dateMon, 04 Jun 2018 17:56:32 +0000
treeherdermozilla-central@5b15326286d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1464917
milestone62.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 1464917 - Add maxPacketLifeTime and maxRetransmits to RTCDatachannel.webidl; r=baku MozReview-Commit-ID: C7PagcoW7Xi
dom/base/nsDOMDataChannel.cpp
dom/base/nsDOMDataChannel.h
dom/webidl/RTCDataChannel.webidl
--- a/dom/base/nsDOMDataChannel.cpp
+++ b/dom/base/nsDOMDataChannel.cpp
@@ -131,16 +131,28 @@ nsDOMDataChannel::Id() const
 
 // XXX should be GetType()?  Open question for the spec
 bool
 nsDOMDataChannel::Reliable() const
 {
   return mDataChannel->GetType() == mozilla::DataChannelConnection::RELIABLE;
 }
 
+mozilla::dom::Nullable<uint16_t>
+nsDOMDataChannel::GetMaxPacketLifeTime() const
+{
+  return mozilla::dom::Nullable<uint16_t>();
+}
+
+mozilla::dom::Nullable<uint16_t>
+nsDOMDataChannel::GetMaxRetransmits() const
+{
+  return mozilla::dom::Nullable<uint16_t>();
+}
+
 bool
 nsDOMDataChannel::Ordered() const
 {
   return mDataChannel->GetOrdered();
 }
 
 RTCDataChannelState
 nsDOMDataChannel::ReadyState() const
--- a/dom/base/nsDOMDataChannel.h
+++ b/dom/base/nsDOMDataChannel.h
@@ -50,16 +50,18 @@ public:
   {
     return GetOwner();
   }
 
   // WebIDL
   void GetLabel(nsAString& aLabel);
   void GetProtocol(nsAString& aProtocol);
   bool Reliable() const;
+  mozilla::dom::Nullable<uint16_t> GetMaxPacketLifeTime() const;
+  mozilla::dom::Nullable<uint16_t> GetMaxRetransmits() const;
   mozilla::dom::RTCDataChannelState ReadyState() const;
   uint32_t BufferedAmount() const;
   uint32_t BufferedAmountLowThreshold() const;
   void SetBufferedAmountLowThreshold(uint32_t aThreshold);
   IMPL_EVENT_HANDLER(open)
   IMPL_EVENT_HANDLER(error)
   IMPL_EVENT_HANDLER(close)
   void Close();
--- a/dom/webidl/RTCDataChannel.webidl
+++ b/dom/webidl/RTCDataChannel.webidl
@@ -13,16 +13,18 @@ enum RTCDataChannelType {
   "arraybuffer",
   "blob"
 };
 
 interface RTCDataChannel : EventTarget
 {
   readonly attribute DOMString label;
   readonly attribute boolean reliable;
+  readonly attribute unsigned short? maxPacketLifeTime;
+  readonly attribute unsigned short? maxRetransmits;
   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;