Bug 906986 - give RTCOfferOptions.iceRestart default value per spec. draft
authorMichael Froman <mfroman@mozilla.com>
Fri, 08 Apr 2016 09:20:53 -0500
changeset 348931 94adca718f98cc3058187bbd2dacec0f17cebfe8
parent 348109 3ca2243950f70cb0369eebfb9d18e575bc83742a
child 517975 e16f188d6b21cdcaa2a01c2d4bc633fc067a646e
push id14961
push usermfroman@nostrum.com
push dateFri, 08 Apr 2016 14:21:45 +0000
bugs906986
milestone48.0a1
Bug 906986 - give RTCOfferOptions.iceRestart default value per spec. MozReview-Commit-ID: GS2EkamNGc7
dom/webidl/RTCPeerConnection.webidl
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/dom/webidl/RTCPeerConnection.webidl
+++ b/dom/webidl/RTCPeerConnection.webidl
@@ -57,17 +57,17 @@ dictionary RTCOfferAnswerOptions {
 };
 
 dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
 };
 
 dictionary RTCOfferOptions : RTCOfferAnswerOptions {
   long    offerToReceiveVideo;
   long    offerToReceiveAudio;
-  boolean iceRestart;
+  boolean iceRestart = false;
 
   // Mozilla proprietary options (at risk: Bug 1196974)
   boolean mozDontOfferDataChannel;
   boolean mozBundleOnly;
 
   // TODO: Remove old constraint-like RTCOptions support soon (Bug 1064223).
   DeprecatedRTCOfferOptionsSet mandatory;
   sequence<DeprecatedRTCOfferOptionsSet> _optional;
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -1529,20 +1529,17 @@ PeerConnectionImpl::CreateOffer(const RT
       mozilla::Some(size_t(aOptions.mOfferToReceiveAudio.Value()));
   }
 
   if (aOptions.mOfferToReceiveVideo.WasPassed()) {
     options.mOfferToReceiveVideo =
         mozilla::Some(size_t(aOptions.mOfferToReceiveVideo.Value()));
   }
 
-  if (aOptions.mIceRestart.WasPassed()) {
-    options.mIceRestart =
-      mozilla::Some(aOptions.mIceRestart.Value());
-  }
+  options.mIceRestart = mozilla::Some(aOptions.mIceRestart);
 
   if (aOptions.mMozDontOfferDataChannel.WasPassed()) {
     options.mDontOfferDataChannel =
       mozilla::Some(aOptions.mMozDontOfferDataChannel.Value());
   }
 #endif
   return CreateOffer(options);
 }