Skip to content

Commit ae0df80

Browse files
SammysHPmaxauthority
authored andcommitted
Remove usage of nsISupportsArray (#779)
nsISupportsArray was deprecated a long time ago and finally removed in Firefox 55 (see https://bugzilla.mozilla.org/show_bug.cgi?id=792209). This should be backwards compatible, but was only tested against FF55.
1 parent eeae20b commit ae0df80

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

common/content/liberator.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -846,14 +846,14 @@ const Liberator = Module("liberator", {
846846

847847
case liberator.NEW_PRIVATE_WINDOW:
848848
case liberator.NEW_WINDOW:
849-
let sa = Cc["@mozilla.org/supports-array;1"].createInstance(Ci.nsISupportsArray);
849+
let sa = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
850850
let wuri = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
851851
wuri.data = url;
852-
sa.AppendElement(wuri);
853-
sa.AppendElement(null); // charset
854-
sa.AppendElement(null); // referrerURI
855-
sa.AppendElement(postdata);
856-
sa.AppendElement(null); // allowThirdPartyFixup
852+
sa.appendElement(wuri, false);
853+
sa.appendElement(null, false); // charset
854+
sa.appendElement(null, false); // referrerURI
855+
sa.appendElement(postdata, false);
856+
sa.appendElement(null, false); // allowThirdPartyFixup
857857

858858
let features = "chrome,dialog=no,all" + (where === liberator.NEW_PRIVATE_WINDOW ? ",private" : "");
859859
let win = services.get("ww").openWindow(window, "chrome://browser/content/browser.xul", null, features, sa);

0 commit comments

Comments
 (0)