Bug 943898: Fixed an important iceState -> iceConnectionState replacement and a few less-important ones. r=abr

This commit is contained in:
Byron Campen [:bwc] 2013-11-27 09:32:23 -08:00
parent f93649bf3c
commit d2ae837ae8

View File

@ -1051,17 +1051,18 @@ PeerConnectionObserver.prototype = {
// closed The ICE Agent has shut down and is no longer responding to
// STUN requests.
handleIceConnectionStateChange: function(iceState) {
handleIceConnectionStateChange: function(iceConnectionState) {
var histogram = Services.telemetry.getHistogramById("WEBRTC_ICE_SUCCESS_RATE");
if (iceState === 'failed') {
if (iceConnectionState === 'failed') {
histogram.add(false);
}
if (this._dompc.iceConnectionState === 'checking' &&
(iceState === 'completed' || iceState === 'connected')) {
(iceConnectionState === 'completed' ||
iceConnectionState === 'connected')) {
histogram.add(true);
}
this._dompc.changeIceConnectionState(iceState);
this._dompc.changeIceConnectionState(iceConnectionState);
},
// This method is responsible for updating iceGatheringState. This
@ -1105,7 +1106,7 @@ PeerConnectionObserver.prototype = {
break;
case "IceConnectionState":
this.handleIceConnectionStateChange(this._dompc._pc.iceState);
this.handleIceConnectionStateChange(this._dompc._pc.iceConnectionState);
break;
case "IceGatheringState":