Bug 906986 - give RTCOfferOptions.iceRestart default value per spec.
MozReview-Commit-ID: GS2EkamNGc7
--- 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);
}