From 0cacba361f8c5daf975e12241e939ee82f29a1fa Mon Sep 17 00:00:00 2001 From: "Byron Campen [:bwc]" Date: Thu, 31 May 2018 11:30:19 -0500 Subject: Bug 1464079 - Bring ICE connection state change callback up to spec. r=jib, a=RyanVM WebRTC --- dom/media/PeerConnection.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'dom/media') 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": -- cgit v1.2.3