Bug 825569 - Allow setLocal/RemoteDescription to be called more than once r=jesup

This commit is contained in:
Ethan Hugg 2013-01-08 10:40:15 -08:00
Родитель 846eecb939
Коммит ab8873ab23
1 изменённых файлов: 1 добавлений и 9 удалений

Просмотреть файл

@ -81,7 +81,7 @@ GlobalPCList.prototype = {
topic == "network:offline-about-to-go-offline") {
// Delete all peerconnections on shutdown - synchronously (we need
// them to be done deleting transports before we return)!
// Also kill them if "Work Offline" is selected - more can be created
// Also kill them if "Work Offline" is selected - more can be created
// while offline, but attempts to connect them should fail.
let array;
while ((array = this._list.pop()) != undefined) {
@ -390,10 +390,6 @@ PeerConnection.prototype = {
},
setLocalDescription: function(desc, onSuccess, onError) {
if (this._onSetLocalDescriptionSuccess) {
throw new Error("setLocalDescription already called");
}
this._onSetLocalDescriptionSuccess = onSuccess;
this._onSetLocalDescriptionFailure = onError;
@ -420,10 +416,6 @@ PeerConnection.prototype = {
},
setRemoteDescription: function(desc, onSuccess, onError) {
if (this._onSetRemoteDescriptionSuccess) {
throw new Error("setRemoteDescription already called");
}
this._onSetRemoteDescriptionSuccess = onSuccess;
this._onSetRemoteDescriptionFailure = onError;