Bug 1464917 - Allow maxPacketLifeTime and maxRetransmits to be zero; r=drno
authorFelix Weinrank <weinrank@fh-muenster.de>
Thu, 31 May 2018 09:49:24 -0400
changeset 421138 2782fc090894
parent 421137 98956646c3aa
child 421139 160f7211a241
push id64807
push userdminor@mozilla.com
push dateMon, 04 Jun 2018 13:05:22 +0000
treeherderautoland@2481a7bf81ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno
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 - Allow maxPacketLifeTime and maxRetransmits to be zero; r=drno MozReview-Commit-ID: HtYGXPy6pZ
dom/media/PeerConnection.js
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -1576,19 +1576,19 @@ class RTCPeerConnection {
     }
     if (maxPacketLifeTime !== undefined && maxRetransmits !== undefined) {
       throw new this._win.DOMException(
           "Both maxPacketLifeTime and maxRetransmits cannot be provided",
           "InvalidParameterError");
     }
     // Must determine the type where we still know if entries are undefined.
     let type;
-    if (maxPacketLifeTime) {
+    if (maxPacketLifeTime !== undefined) {
       type = Ci.IPeerConnection.kDataChannelPartialReliableTimed;
-    } else if (maxRetransmits) {
+    } else if (maxRetransmits !== undefined) {
       type = Ci.IPeerConnection.kDataChannelPartialReliableRexmit;
     } else {
       type = Ci.IPeerConnection.kDataChannelReliable;
     }
     // Synchronous since it doesn't block.
     let dataChannel =
       this._impl.createDataChannel(label, protocol, type, ordered,
                                    maxPacketLifeTime, maxRetransmits,