Bug 1541168: Remove remaining newChannelFromURI2 appearances. r=valentin a=pascalc
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Wed, 03 Apr 2019 10:45:48 +0000
changeset 525976 ad953d1d63f6d9fda6b4483a16632d8938a966f4
parent 525975 e0f62b77623697545dd2eb5c7e061a65a723f68e
child 525977 dff20faae9f496959a1a42722e8f9a7e64f0abde
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin, pascalc
bugs1541168
milestone67.0
Bug 1541168: Remove remaining newChannelFromURI2 appearances. r=valentin a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D25916
dom/base/test/chrome/test_bug682305.html
image/decoders/icon/android/nsIconChannel.cpp
image/decoders/icon/gtk/nsIconChannel.cpp
toolkit/components/resistfingerprinting/RFPHelper.jsm
toolkit/components/search/SearchService.jsm
--- a/dom/base/test/chrome/test_bug682305.html
+++ b/dom/base/test/chrome/test_bug682305.html
@@ -108,17 +108,17 @@ CustomProtocol.prototype = {
     return false;
   },
   newURI: function newURI(spec, charset, baseURI) {
     return Cc["@mozilla.org/network/simple-uri-mutator;1"]
              .createInstance(Ci.nsIURIMutator)
              .setSpec(spec)
              .finalize();
   },
-  newChannel: function newChannel2(URI, loadInfo) {
+  newChannel: function newChannel(URI, loadInfo) {
     return new CustomChannel(URI, loadInfo);
   },
   QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIProtocolHandler]),
 };
 
 var gFactory = {
   register() {
     var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
--- a/image/decoders/icon/android/nsIconChannel.cpp
+++ b/image/decoders/icon/android/nsIconChannel.cpp
@@ -99,17 +99,17 @@ static nsresult moz_icon_to_channel(nsIU
 
   nsCOMPtr<nsIStringInputStream> stream =
       do_CreateInstance("@mozilla.org/io/string-input-stream;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = stream->AdoptData((char*)buf, buf_size);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // nsIconProtocolHandler::NewChannel2 will provide the correct loadInfo for
+  // nsIconProtocolHandler::NewChannel will provide the correct loadInfo for
   // this iconChannel. Use the most restrictive security settings for the
   // temporary loadInfo to make sure the channel can not be openend.
   nsCOMPtr<nsIPrincipal> nullPrincipal =
       NullPrincipal::CreateWithoutOriginAttributes();
   return NS_NewInputStreamChannel(
       aChannel, aURI, stream.forget(), nullPrincipal,
       nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED,
       nsIContentPolicy::TYPE_INTERNAL_IMAGE, NS_LITERAL_CSTRING(IMAGE_ICON_MS));
--- a/image/decoders/icon/gtk/nsIconChannel.cpp
+++ b/image/decoders/icon/gtk/nsIconChannel.cpp
@@ -93,17 +93,17 @@ static nsresult moz_gdk_pixbuf_to_channe
   // stream takes ownership of buf and will free it on destruction.
   // This function cannot fail.
   rv = stream->AdoptData((char*)buf, buf_size);
 
   // If this no longer holds then re-examine buf's lifetime.
   MOZ_ASSERT(NS_SUCCEEDED(rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // nsIconProtocolHandler::NewChannel2 will provide the correct loadInfo for
+  // nsIconProtocolHandler::NewChannel will provide the correct loadInfo for
   // this iconChannel. Use the most restrictive security settings for the
   // temporary loadInfo to make sure the channel can not be openend.
   nsCOMPtr<nsIPrincipal> nullPrincipal =
       mozilla::NullPrincipal::CreateWithoutOriginAttributes();
   return NS_NewInputStreamChannel(
       aChannel, aURI, stream.forget(), nullPrincipal,
       nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED,
       nsIContentPolicy::TYPE_INTERNAL_IMAGE, NS_LITERAL_CSTRING(IMAGE_ICON_MS));
--- a/toolkit/components/resistfingerprinting/RFPHelper.jsm
+++ b/toolkit/components/resistfingerprinting/RFPHelper.jsm
@@ -255,17 +255,17 @@ class _RFPHelper {
       null, "", message, flags, null, null, null, null, {value: false});
 
     // Update preferences to reflect their response and to prevent the prompt
     // from being displayed again.
     Services.prefs.setIntPref(kPrefSpoofEnglish, (response == 0) ? 2 : 1);
   }
 
   _getCurrentAcceptLanguageValue(uri) {
-    let channel = Services.io.newChannelFromURI2(
+    let channel = Services.io.newChannelFromURI(
         uri,
         null, // aLoadingNode
         Services.scriptSecurityManager.getSystemPrincipal(),
         null, // aTriggeringPrincipal
         Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
         Ci.nsIContentPolicy.TYPE_OTHER);
     let httpChannel;
     try {
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -718,17 +718,17 @@ function makeURI(aURLSpec, aCharset) {
   try {
     return Services.io.newURI(aURLSpec, aCharset);
   } catch (ex) { }
 
   return null;
 }
 
 /**
- * Wrapper function for nsIIOService::newChannel2.
+ * Wrapper function for nsIIOService::newChannel.
  * @param url
  *        The URL string from which to create an nsIChannel.
  * @returns an nsIChannel object, or null if the url is invalid.
  */
 function makeChannel(url) {
   try {
     let uri = typeof url == "string" ? Services.io.newURI(url) : url;
     return Services.io.newChannelFromURI(uri,