diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js index 8e1c49d954a..ee0aced29d7 100644 --- a/dom/media/PeerConnection.js +++ b/dom/media/PeerConnection.js @@ -259,7 +259,9 @@ RTCPeerConnection.prototype = { this.makeGetterSetterEH("oniceconnectionstatechange"); this._pc = new this._win.PeerConnectionImpl(); - this._observer = new this._win.PeerConnectionObserver(this); + + this.__DOM_IMPL__._innerObject = this; + this._observer = new this._win.PeerConnectionObserver(this.__DOM_IMPL__); this._winID = this._win.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID; @@ -845,7 +847,7 @@ PeerConnectionObserver.prototype = { init: function(win) { this._win = win; }, __init: function(dompc) { - this._dompc = dompc; + this._dompc = dompc._innerObject; }, dispatchEvent: function(event) { diff --git a/dom/webidl/PeerConnectionObserver.webidl b/dom/webidl/PeerConnectionObserver.webidl index a8bdbd73bfe..3edb3907a26 100644 --- a/dom/webidl/PeerConnectionObserver.webidl +++ b/dom/webidl/PeerConnectionObserver.webidl @@ -8,7 +8,7 @@ interface nsISupports; [ChromeOnly, JSImplementation="@mozilla.org/dom/peerconnectionobserver;1", - Constructor (object domPC)] + Constructor (mozRTCPeerConnection domPC)] interface PeerConnectionObserver { /* JSEP callbacks */