Bug 791330: Suppress calls to PC after close has been called; r=anant

This commit is contained in:
EKR 2012-10-20 09:43:57 -07:00
parent 460479485f
commit 0da9a18934

View File

@ -123,6 +123,7 @@ function PeerConnection() {
this._pc = null;
this._observer = null;
this._closed = false;
this._onCreateOfferSuccess = null;
this._onCreateOfferFailure = null;
@ -203,6 +204,9 @@ PeerConnection.prototype = {
* call _executeNext, false if it doesn't have a callback.
*/
_queueOrRun: function(obj) {
if (this._closed) {
return;
}
if (!this._pending) {
obj.func.apply(this, obj.args);
if (obj.wait) {
@ -420,6 +424,7 @@ PeerConnection.prototype = {
args: [],
wait: false
});
this._closed = true;
},
get localStreams() {