Bug 810458 - Make mozRTCSessionDescriptor respect the spec. r=jesup

This commit is contained in:
Paul Adenot 2012-11-21 08:59:02 +01:00
parent 56866e71cd
commit a2c374d776

View File

@ -144,13 +144,17 @@ SessionDescription.prototype = {
Ci.nsIDOMRTCSessionDescription, Ci.nsIDOMGlobalObjectConstructor
]),
constructor: function(win, type, sdp) {
constructor: function(win, descriptionInitDict) {
if (this._win) {
throw new Error("Constructor already called");
}
this._win = win;
this.type = type;
this.sdp = sdp;
if (descriptionInitDict !== undefined) {
this.type = descriptionInitDict.type || null;
this.sdp = descriptionInitDict.sdp || null;
} else {
this.type = this.sdp = null;
}
},
toString: function() {