TOP-9999999-port1514936-suite-102a1.patch 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. # HG changeset patch
  2. # User Bill Gianopoulos <wgianopoulos@gmail.com>
  3. # Date 1652731241 0
  4. # Parent 14083812bb3ebf664877a11a3de4364488856e5b
  5. Bug 9999999 - Port bug 1514936 to suite
  6. Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance.
  7. diff --git a/suite/browser/nsBrowserContentHandler.js b/suite/browser/nsBrowserContentHandler.js
  8. --- a/suite/browser/nsBrowserContentHandler.js
  9. +++ b/suite/browser/nsBrowserContentHandler.js
  10. @@ -600,20 +600,17 @@ var nsBrowserContentHandler = {
  11. handURIToExistingBrowser(request.URI,
  12. nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW,
  13. "chrome,all,dialog=no",
  14. request.loadInfo.triggeringPrincipal);
  15. request.cancel(Cr.NS_BINDING_ABORTED);
  16. },
  17. /* nsIFactory */
  18. - createInstance: function createInstance(outer, iid) {
  19. - if (outer != null)
  20. - throw Cr.NS_ERROR_NO_AGGREGATION;
  21. -
  22. + createInstance: function createInstance(iid) {
  23. return this.QueryInterface(iid);
  24. },
  25. };
  26. const BROWSER_CID = Components.ID("{c2343730-dc2c-11d3-98b3-001083010e9b}");
  27. function NSGetFactory(cid) {
  28. if (cid.number == BROWSER_CID)
  29. diff --git a/suite/chatzilla/js/lib/chatzilla-service.js b/suite/chatzilla/js/lib/chatzilla-service.js
  30. --- a/suite/chatzilla/js/lib/chatzilla-service.js
  31. +++ b/suite/chatzilla/js/lib/chatzilla-service.js
  32. @@ -139,21 +139,18 @@ CommandLineService.prototype =
  33. helpInfo: "-chat [<ircurl>] Start with an IRC chat client.\n",
  34. };
  35. /* factory for command line handler service (CommandLineService) */
  36. const CommandLineFactory =
  37. {
  38. - createInstance(outer, iid)
  39. + createInstance(iid)
  40. {
  41. - if (outer != null)
  42. - throw Cr.NS_ERROR_NO_AGGREGATION;
  43. -
  44. return new CommandLineService().QueryInterface(iid);
  45. },
  46. };
  47. function ProcessHandler()
  48. {
  49. }
  50. @@ -201,21 +198,18 @@ ProcessHandler.prototype =
  51. spawnChatZilla(msg.data.uri);
  52. },
  53. };
  54. const StartupFactory =
  55. {
  56. - createInstance(outer, iid)
  57. + createInstance(iid)
  58. {
  59. - if (outer)
  60. - throw Cr.NS_ERROR_NO_AGGREGATION;
  61. -
  62. if (!iid.equals(Ci.nsISupports))
  63. throw Cr.NS_ERROR_NO_INTERFACE;
  64. // startup:
  65. return new ProcessHandler();
  66. },
  67. };
  68. diff --git a/suite/chatzilla/js/lib/protocol-handlers.jsm b/suite/chatzilla/js/lib/protocol-handlers.jsm
  69. --- a/suite/chatzilla/js/lib/protocol-handlers.jsm
  70. +++ b/suite/chatzilla/js/lib/protocol-handlers.jsm
  71. @@ -94,39 +94,33 @@ IRCProtocolHandler.prototype =
  72. return new BogusChannel(URI, this.isSecure);
  73. },
  74. };
  75. this.IRCProtocolHandlerFactory =
  76. {
  77. - createInstance(outer, iid)
  78. + createInstance(iid)
  79. {
  80. - if (outer != null)
  81. - throw Cr.NS_ERROR_NO_AGGREGATION;
  82. -
  83. if (!iid.equals(Ci.nsIProtocolHandler) && !iid.equals(Ci.nsISupports))
  84. throw Cr.NS_ERROR_INVALID_ARG;
  85. const protHandler = new IRCProtocolHandler(false);
  86. protHandler.scheme = "irc";
  87. protHandler.defaultPort = 6667;
  88. return protHandler;
  89. },
  90. };
  91. this.IRCSProtocolHandlerFactory =
  92. {
  93. - createInstance(outer, iid)
  94. + createInstance(iid)
  95. {
  96. - if (outer != null)
  97. - throw Cr.NS_ERROR_NO_AGGREGATION;
  98. -
  99. if (!iid.equals(Ci.nsIProtocolHandler) && !iid.equals(Ci.nsISupports))
  100. throw Cr.NS_ERROR_INVALID_ARG;
  101. const protHandler = new IRCProtocolHandler(true);
  102. protHandler.scheme = "ircs";
  103. protHandler.defaultPort = 6697;
  104. return protHandler;
  105. },
  106. diff --git a/suite/components/feeds/WebContentConverter.js b/suite/components/feeds/WebContentConverter.js
  107. --- a/suite/components/feeds/WebContentConverter.js
  108. +++ b/suite/components/feeds/WebContentConverter.js
  109. @@ -57,19 +57,17 @@ WebContentConverter.prototype = {
  110. },
  111. QueryInterface: ChromeUtils.generateQI(
  112. [Ci.nsIStreamConverter,
  113. Ci.nsIStreamListener])
  114. };
  115. var WebContentConverterFactory = {
  116. - createInstance: function createInstance(outer, iid) {
  117. - if (outer != null)
  118. - throw Cr.NS_ERROR_NO_AGGREGATION;
  119. + createInstance: function createInstance(iid) {
  120. return new WebContentConverter().QueryInterface(iid);
  121. },
  122. QueryInterface: ChromeUtils.generateQI(
  123. [Ci.nsIFactory])
  124. };
  125. function ServiceInfo(contentType, uri, name) {
  126. @@ -814,19 +812,17 @@ WebContentConverterRegistrar.prototype =
  127. this._init();
  128. break;
  129. }
  130. },
  131. /**
  132. * See nsIFactory
  133. */
  134. - createInstance: function createInstance(outer, iid) {
  135. - if (outer != null)
  136. - throw Cr.NS_ERROR_NO_AGGREGATION;
  137. + createInstance: function createInstance(iid) {
  138. return this.QueryInterface(iid);
  139. },
  140. classID: WCCR_CLASSID,
  141. classInfo: XPCOMUtils.generateCI({
  142. classID: WCCR_CLASSID,
  143. contractID: WCCR_CONTRACTID,
  144. interfaces: [Ci.nsIWebContentConverterService,