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 421121 2782fc090894
parent 421120 98956646c3aa
child 421122 160f7211a241
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)
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,