summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/media/PeerConnection.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js
index 0c3021799..d13f1d0fb 100644
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -1445,7 +1445,10 @@ PeerConnectionObserver.prototype = {
break;
case "IceConnectionState":
- this.handleIceConnectionStateChange(this._dompc._pc.iceConnectionState);
+ let connState = this._dompc._pc.iceConnectionState;
+ this._dompc._queueTaskWithClosedCheck(() => {
+ this.handleIceConnectionStateChange(connState);
+ });
break;
case "IceGatheringState":