diff --git a/js/lib/protocol-handlers.jsm b/js/lib/protocol-handlers.jsm --- a/js/lib/protocol-handlers.jsm +++ b/js/lib/protocol-handlers.jsm @@ -17,19 +17,19 @@ "@mozilla.org/network/standard-url;1"; const IOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1"; const IRCPROT_HANDLER_CONTRACTID = "@mozilla.org/network/protocol;1?name=irc"; const IRCSPROT_HANDLER_CONTRACTID = "@mozilla.org/network/protocol;1?name=ircs"; -const IRCPROT_HANDLER_CID = +this.IRCPROT_HANDLER_CID = Components.ID("{f21c35f4-1dd1-11b2-a503-9bf8a539ea39}"); -const IRCSPROT_HANDLER_CID = +this.IRCSPROT_HANDLER_CID = Components.ID("{f21c35f4-1dd1-11b2-a503-9bf8a539ea3a}"); const IRC_MIMETYPE = "application/x-irc"; const IRCS_MIMETYPE = "application/x-ircs"; //XXXgijs: Because necko is annoying and doesn't expose this error flag, we // define our own constant for it. Throwing something else will show // ugly errors instead of seeminly doing nothing. @@ -88,17 +88,17 @@ if (!ios.allowPort(URI.port, URI.scheme)) throw Cr.NS_ERROR_FAILURE; return new BogusChannel(URI, this.isSecure); }, }; -const IRCProtocolHandlerFactory = +this.IRCProtocolHandlerFactory = { createInstance(outer, 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; @@ -106,17 +106,17 @@ const protHandler = new IRCProtocolHandler(false); protHandler.scheme = "irc"; protHandler.defaultPort = 6667; return protHandler; }, }; -const IRCSProtocolHandlerFactory = +this.IRCSProtocolHandlerFactory = { createInstance(outer, 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; @@ -202,17 +202,17 @@ resume() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, }; -const ChatZillaProtocols = +this.ChatZillaProtocols = { init() { const compMgr = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); compMgr.registerFactory(IRCPROT_HANDLER_CID, "IRC protocol handler", IRCPROT_HANDLER_CONTRACTID, IRCProtocolHandlerFactory);