зеркало из https://github.com/mozilla/gecko-dev.git
Bug 872839 - Part 1: Put new PeerConnections on global list earlier, ensuring close is called should PC.initialize fail. r=jesup
This commit is contained in:
Родитель
98339e6a93
Коммит
a664470d9e
|
@ -295,6 +295,11 @@ RTCPeerConnection.prototype = {
|
|||
this._pc = Cc["@mozilla.org/peerconnection;1"].
|
||||
createInstance(Ci.IPeerConnection);
|
||||
this._observer = new PeerConnectionObserver(this);
|
||||
this._winID = this._win.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
|
||||
|
||||
// Add a reference to the PeerConnection to global list (before init).
|
||||
_globalPCList.addPC(this);
|
||||
|
||||
// Nothing starts until ICE gathering completes.
|
||||
this._queueOrRun({
|
||||
|
@ -302,12 +307,6 @@ RTCPeerConnection.prototype = {
|
|||
args: [this._observer, this._win, rtcConfig, Services.tm.currentThread],
|
||||
wait: true
|
||||
});
|
||||
|
||||
this._winID = this._win.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
|
||||
|
||||
// Add a reference to the PeerConnection to global list.
|
||||
_globalPCList.addPC(this);
|
||||
},
|
||||
|
||||
_getPC: function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче