|
@@ -0,0 +1,170 @@
|
|
|
+# HG changeset patch
|
|
|
+# User Bill Gianopoulos <wgianopoulos@gmail.com>
|
|
|
+# Date 1652731241 0
|
|
|
+Bug 9999999 - Port bug 1514936 to suite
|
|
|
+Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance.
|
|
|
+
|
|
|
+diff --git a/suite/browser/nsBrowserContentHandler.js b/suite/browser/nsBrowserContentHandler.js
|
|
|
+--- a/suite/browser/nsBrowserContentHandler.js
|
|
|
++++ b/suite/browser/nsBrowserContentHandler.js
|
|
|
+@@ -602,20 +602,17 @@ var nsBrowserContentHandler = {
|
|
|
+ handURIToExistingBrowser(request.URI,
|
|
|
+ nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW,
|
|
|
+ "chrome,all,dialog=no",
|
|
|
+ request.loadInfo.triggeringPrincipal);
|
|
|
+ request.cancel(Cr.NS_BINDING_ABORTED);
|
|
|
+ },
|
|
|
+
|
|
|
+ /* nsIFactory */
|
|
|
+- createInstance: function createInstance(outer, iid) {
|
|
|
+- if (outer != null)
|
|
|
+- throw Cr.NS_ERROR_NO_AGGREGATION;
|
|
|
+-
|
|
|
++ createInstance: function createInstance(iid) {
|
|
|
+ return this.QueryInterface(iid);
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ const BROWSER_CID = Components.ID("{c2343730-dc2c-11d3-98b3-001083010e9b}");
|
|
|
+
|
|
|
+ function NSGetFactory(cid) {
|
|
|
+ if (cid.number == BROWSER_CID)
|
|
|
+diff --git a/suite/chatzilla/js/lib/chatzilla-service.js b/suite/chatzilla/js/lib/chatzilla-service.js
|
|
|
+--- a/suite/chatzilla/js/lib/chatzilla-service.js
|
|
|
++++ b/suite/chatzilla/js/lib/chatzilla-service.js
|
|
|
+@@ -139,21 +139,18 @@ CommandLineService.prototype =
|
|
|
+
|
|
|
+ helpInfo: "-chat [<ircurl>] Start with an IRC chat client.\n",
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ /* factory for command line handler service (CommandLineService) */
|
|
|
+ const CommandLineFactory =
|
|
|
+ {
|
|
|
+- createInstance(outer, iid)
|
|
|
++ createInstance(iid)
|
|
|
+ {
|
|
|
+- if (outer != null)
|
|
|
+- throw Cr.NS_ERROR_NO_AGGREGATION;
|
|
|
+-
|
|
|
+ return new CommandLineService().QueryInterface(iid);
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ function ProcessHandler()
|
|
|
+ {
|
|
|
+ }
|
|
|
+@@ -201,21 +198,18 @@ ProcessHandler.prototype =
|
|
|
+
|
|
|
+ spawnChatZilla(msg.data.uri);
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ const StartupFactory =
|
|
|
+ {
|
|
|
+- createInstance(outer, iid)
|
|
|
++ createInstance(iid)
|
|
|
+ {
|
|
|
+- if (outer)
|
|
|
+- throw Cr.NS_ERROR_NO_AGGREGATION;
|
|
|
+-
|
|
|
+ if (!iid.equals(Ci.nsISupports))
|
|
|
+ throw Cr.NS_ERROR_NO_INTERFACE;
|
|
|
+
|
|
|
+ // startup:
|
|
|
+ return new ProcessHandler();
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+diff --git a/suite/chatzilla/js/lib/protocol-handlers.jsm b/suite/chatzilla/js/lib/protocol-handlers.jsm
|
|
|
+--- a/suite/chatzilla/js/lib/protocol-handlers.jsm
|
|
|
++++ b/suite/chatzilla/js/lib/protocol-handlers.jsm
|
|
|
+@@ -103,39 +103,33 @@ IRCProtocolHandler.prototype =
|
|
|
+
|
|
|
+ return new BogusChannel(URI, this.isSecure);
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ this.IRCProtocolHandlerFactory =
|
|
|
+ {
|
|
|
+- createInstance(outer, iid)
|
|
|
++ createInstance(iid)
|
|
|
+ {
|
|
|
+- if (outer != null)
|
|
|
+- throw Cr.NS_ERROR_NO_AGGREGATION;
|
|
|
+-
|
|
|
+ if (!iid.equals(Ci.nsIProtocolHandler) && !iid.equals(Ci.nsISupports))
|
|
|
+ throw Cr.NS_ERROR_INVALID_ARG;
|
|
|
+
|
|
|
+ const protHandler = new IRCProtocolHandler(false);
|
|
|
+ protHandler.scheme = "irc";
|
|
|
+ protHandler.defaultPort = 6667;
|
|
|
+ return protHandler;
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ this.IRCSProtocolHandlerFactory =
|
|
|
+ {
|
|
|
+- createInstance(outer, iid)
|
|
|
++ createInstance(iid)
|
|
|
+ {
|
|
|
+- if (outer != null)
|
|
|
+- throw Cr.NS_ERROR_NO_AGGREGATION;
|
|
|
+-
|
|
|
+ if (!iid.equals(Ci.nsIProtocolHandler) && !iid.equals(Ci.nsISupports))
|
|
|
+ throw Cr.NS_ERROR_INVALID_ARG;
|
|
|
+
|
|
|
+ const protHandler = new IRCProtocolHandler(true);
|
|
|
+ protHandler.scheme = "ircs";
|
|
|
+ protHandler.defaultPort = 6697;
|
|
|
+ return protHandler;
|
|
|
+ },
|
|
|
+diff --git a/suite/components/feeds/WebContentConverter.js b/suite/components/feeds/WebContentConverter.js
|
|
|
+--- a/suite/components/feeds/WebContentConverter.js
|
|
|
++++ b/suite/components/feeds/WebContentConverter.js
|
|
|
+@@ -61,19 +61,17 @@ WebContentConverter.prototype = {
|
|
|
+ },
|
|
|
+
|
|
|
+ QueryInterface: ChromeUtils.generateQI(
|
|
|
+ [Ci.nsIStreamConverter,
|
|
|
+ Ci.nsIStreamListener])
|
|
|
+ };
|
|
|
+
|
|
|
+ var WebContentConverterFactory = {
|
|
|
+- createInstance: function createInstance(outer, iid) {
|
|
|
+- if (outer != null)
|
|
|
+- throw Cr.NS_ERROR_NO_AGGREGATION;
|
|
|
++ createInstance: function createInstance(iid) {
|
|
|
+ return new WebContentConverter().QueryInterface(iid);
|
|
|
+ },
|
|
|
+
|
|
|
+ QueryInterface: ChromeUtils.generateQI(
|
|
|
+ [Ci.nsIFactory])
|
|
|
+ };
|
|
|
+
|
|
|
+ function ServiceInfo(contentType, uri, name) {
|
|
|
+@@ -784,19 +782,17 @@ WebContentConverterRegistrar.prototype =
|
|
|
+ this._init();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * See nsIFactory
|
|
|
+ */
|
|
|
+- createInstance: function createInstance(outer, iid) {
|
|
|
+- if (outer != null)
|
|
|
+- throw Cr.NS_ERROR_NO_AGGREGATION;
|
|
|
++ createInstance: function createInstance(iid) {
|
|
|
+ return this.QueryInterface(iid);
|
|
|
+ },
|
|
|
+
|
|
|
+ classID: WCCR_CLASSID,
|
|
|
+ classInfo: XPCOMUtils.generateCI({
|
|
|
+ classID: WCCR_CLASSID,
|
|
|
+ contractID: WCCR_CONTRACTID,
|
|
|
+ interfaces: [Ci.nsIWebContentConverterService,
|