Bug 1503023 - After waiting for certs make sure the PeerConnection still exists r=jib

Ensure that a PeerConnection is still open before setting the certificates.

Differential Revision: https://phabricator.services.mozilla.com/D10122

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nico Grunbaum 2018-10-29 22:57:10 +00:00
Родитель 41766ace70
Коммит 29b141f8e4
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -581,8 +581,11 @@ class RTCPeerConnection {
name: "ECDSA", namedCurve: "P-256", name: "ECDSA", namedCurve: "P-256",
}); });
} }
// Is the PC still around after the await?
if (!this._closed) {
this._impl.certificate = certificate; this._impl.certificate = certificate;
} }
}
_resetPeerIdentityPromise() { _resetPeerIdentityPromise() {
this._peerIdentity = new this._win.Promise((resolve, reject) => { this._peerIdentity = new this._win.Promise((resolve, reject) => {