123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- # HG changeset patch
- # User Bill Gianopoulos <wgianopoulos@gmail.com>
- # Date 1652731241 0
- # Parent 14083812bb3ebf664877a11a3de4364488856e5b
- 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
- @@ -600,20 +600,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
- @@ -94,39 +94,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
- @@ -57,19 +57,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) {
- @@ -814,19 +812,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,
|