Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws.
authorFlorian Quèze <florian@queze.net>
Mon, 09 Jan 2017 20:27:26 +0100
changeset 328665 d816f539d536
parent 328664 fca014f3f8aa
child 328666 79c7e3434630
push id31182
push usercbook@mozilla.com
push dateTue, 10 Jan 2017 11:14:56 +0000
treeherdermozilla-central@7011ed1427de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1329182
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws.
addon-sdk/source/app-extension/bootstrap.js
addon-sdk/source/lib/dev/toolbox.js
addon-sdk/source/lib/sdk/test/harness.js
addon-sdk/source/lib/sdk/uri/resource.js
addon-sdk/source/lib/sdk/url.js
addon-sdk/source/lib/sdk/url/utils.js
addon-sdk/source/lib/sdk/window/utils.js
addon-sdk/source/test/addons/content-permissions/httpd.js
addon-sdk/source/test/addons/content-script-messages-latency/httpd.js
addon-sdk/source/test/addons/e10s-content/lib/httpd.js
addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js
addon-sdk/source/test/addons/places/lib/httpd.js
addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js
addon-sdk/source/test/lib/httpd.js
addon-sdk/source/test/test-system-events.js
addon-sdk/source/test/test-traceback.js
addon-sdk/source/test/test-xpcom.js
b2g/chrome/content/shell.js
b2g/chrome/content/shell_remote.js
b2g/components/AboutServiceWorkers.jsm
b2g/components/B2GAboutRedirector.js
b2g/components/ErrorPage.jsm
b2g/components/SafeMode.jsm
caps/tests/unit/test_origin.js
chrome/test/unit/test_bug292789.js
chrome/test/unit/test_bug380398.js
chrome/test/unit/test_bug397073.js
chrome/test/unit/test_bug399707.js
chrome/test/unit/test_bug401153.js
chrome/test/unit/test_bug415367.js
chrome/test/unit/test_bug564667.js
chrome/test/unit/test_crlf.js
chrome/test/unit/test_data_protocol_registration.js
chrome/test/unit/test_no_remote_registration.js
chrome/test/unit/test_resolve_uris.js
docshell/test/unit/test_bug442584.js
docshell/test/unit/test_nsIDownloadHistory.js
dom/base/contentAreaDropListener.js
dom/base/test/unit/test_cancelPrefetch.js
dom/browser-element/BrowserElementChildPreload.js
dom/browser-element/BrowserElementParent.js
dom/browser-element/mochitest/browserElement_Auth.js
dom/html/test/browser_bug649778.js
dom/indexedDB/test/bug839193.js
dom/indexedDB/test/head.js
dom/indexedDB/test/unit/test_bad_origin_directory.js
dom/indexedDB/test/unit/test_defaultStorageUpgrade.js
dom/indexedDB/test/unit/test_idbSubdirUpgrade.js
dom/indexedDB/test/unit/test_metadata2Restore.js
dom/indexedDB/test/unit/test_metadataRestore.js
dom/indexedDB/test/unit/test_oldDirectories.js
dom/indexedDB/test/unit/test_open_for_principal.js
dom/indexedDB/test/unit/test_schema23upgrade.js
dom/indexedDB/test/unit/test_storagePersistentUpgrade.js
dom/indexedDB/test/unit/xpcshell-head-parent-process.js
dom/ipc/tests/browser_domainPolicy.js
dom/media/IdpSandbox.jsm
dom/media/PeerConnection.js
dom/notification/test/browser/browser_permission_dismiss.js
dom/presentation/provider/AndroidCastDeviceProvider.js
dom/push/PushRecord.jsm
dom/push/PushService.jsm
dom/push/PushServiceHttp2.jsm
dom/push/PushServiceWebSocket.jsm
dom/push/test/xpcshell/test_drop_expired.js
dom/push/test/xpcshell/test_permissions.js
dom/push/test/xpcshell/test_quota_observer.js
dom/push/test/xpcshell/test_record.js
dom/push/test/xpcshell/test_service_child.js
dom/settings/SettingsDB.jsm
dom/tests/browser/browser_ConsoleAPI_originAttributes.js
dom/tests/mochitest/ajax/offline/offlineTests.js
dom/tests/unit/test_bug465752.js
extensions/cookie/test/unit/test_permmanager_matches.js
extensions/cookie/test/unit/test_permmanager_matchesuri.js
extensions/cookie/test/unit/test_permmanager_migrate_4-7.js
extensions/cookie/test/unit/test_permmanager_migrate_5-7a.js
extensions/cookie/test/unit/test_permmanager_migrate_6-7a.js
extensions/cookie/test/unit/test_permmanager_migrate_7-8.js
extensions/cookie/test/unit/test_permmanager_removeforapp.js
extensions/cookie/test/unit/test_permmanager_removepermission.js
extensions/cookie/test/unit_ipc/test_child.js
extensions/cookie/test/unit_ipc/test_parent.js
extensions/pref/autoconfig/src/prefcalls.js
image/test/unit/test_async_notification.js
image/test/unit/test_async_notification_404.js
image/test/unit/test_async_notification_animated.js
image/test/unit/test_moz_icon_uri.js
image/test/unit/test_private_channel.js
js/xpconnect/tests/unit/test_import.js
layout/tools/layout-debug/ui/content/layoutdebug.js
layout/tools/reftest/b2g_start_script.js
layout/tools/reftest/reftest.jsm
mobile/android/chrome/content/Feedback.js
mobile/android/chrome/content/aboutHealthReport.js
mobile/android/chrome/content/browser.js
mobile/android/components/AboutRedirector.js
mobile/android/components/BrowserCLH.js
mobile/android/components/PromptService.js
mobile/android/components/SessionStore.js
mobile/android/extensions/flyweb/bootstrap.js
mobile/android/modules/FxAccountsWebChannel.jsm
mobile/android/modules/HelperApps.jsm
mobile/android/modules/Home.jsm
mobile/android/modules/JavaAddonManager.jsm
mobile/android/modules/PageActions.jsm
mobile/android/tests/browser/robocop/robocop_testharness.js
modules/libjar/test/unit/test_bug278262.js
netwerk/cookie/test/unit/test_bug1155169.js
netwerk/cookie/test/unit/test_eviction.js
netwerk/protocol/http/UserAgentOverrides.jsm
netwerk/test/browser/browser_child_resource.js
netwerk/test/httpserver/httpd.js
netwerk/test/httpserver/test/test_default_index_handler.js
netwerk/test/unit/head_cache.js
netwerk/test/unit/test_304_responses.js
netwerk/test/unit/test_NetUtil.js
netwerk/test/unit/test_URIs.js
netwerk/test/unit/test_URIs2.js
netwerk/test/unit/test_about_networking.js
netwerk/test/unit/test_about_protocol.js
netwerk/test/unit/test_aboutblank.js
netwerk/test/unit/test_auth_dialog_permission.js
netwerk/test/unit/test_auth_jar.js
netwerk/test/unit/test_authentication.js
netwerk/test/unit/test_authpromptwrapper.js
netwerk/test/unit/test_bug1195415.js
netwerk/test/unit/test_bug261425.js
netwerk/test/unit/test_bug321706.js
netwerk/test/unit/test_bug337744.js
netwerk/test/unit/test_bug368702.js
netwerk/test/unit/test_bug371473.js
netwerk/test/unit/test_bug376844.js
netwerk/test/unit/test_bug379034.js
netwerk/test/unit/test_bug380994.js
netwerk/test/unit/test_bug388281.js
netwerk/test/unit/test_bug396389.js
netwerk/test/unit/test_bug412457.js
netwerk/test/unit/test_bug429347.js
netwerk/test/unit/test_bug455311.js
netwerk/test/unit/test_bug479485.js
netwerk/test/unit/test_bug504014.js
netwerk/test/unit/test_bug528292.js
netwerk/test/unit/test_bug580508.js
netwerk/test/unit/test_bug667818.js
netwerk/test/unit/test_bug767025.js
netwerk/test/unit/test_cache-control_request.js
netwerk/test/unit/test_cacheForOfflineUse_no-store.js
netwerk/test/unit/test_cacheflags.js
netwerk/test/unit/test_cookie_blacklist.js
netwerk/test/unit/test_dns_proxy_bypass.js
netwerk/test/unit/test_fallback_no-cache-entry_canceled.js
netwerk/test/unit/test_fallback_no-cache-entry_passing.js
netwerk/test/unit/test_fallback_redirect-to-different-origin_canceled.js
netwerk/test/unit/test_fallback_redirect-to-different-origin_passing.js
netwerk/test/unit/test_fallback_request-error_canceled.js
netwerk/test/unit/test_fallback_request-error_passing.js
netwerk/test/unit/test_fallback_response-error_canceled.js
netwerk/test/unit/test_fallback_response-error_passing.js
netwerk/test/unit/test_header_Accept-Language_case.js
netwerk/test/unit/test_httpcancel.js
netwerk/test/unit/test_nestedabout_serialize.js
netwerk/test/unit/test_offlinecache_custom-directory.js
netwerk/test/unit/test_permmgr.js
netwerk/test/unit/test_pinned_app_cache.js
netwerk/test/unit/test_predictor.js
netwerk/test/unit/test_protocolproxyservice.js
netwerk/test/unit/test_redirect_from_script.js
netwerk/test/unit/test_redirect_from_script_after-open_passing.js
netwerk/test/unit/test_referrer.js
netwerk/test/unit/test_referrer_policy.js
netwerk/test/unit/test_speculative_connect.js
netwerk/test/unit/test_standardurl_port.js
netwerk/test/unit/test_synthesized_response.js
netwerk/test/unit/test_websocket_offline.js
security/manager/ssl/tests/mochitest/browser/browser_bug627234_perwindowpb.js
security/manager/ssl/tests/unit/test_cert_overrides.js
security/manager/ssl/tests/unit/test_forget_about_site_security_headers.js
security/manager/ssl/tests/unit/test_ocsp_must_staple.js
security/manager/ssl/tests/unit/test_ocsp_no_hsts_upgrade.js
security/manager/ssl/tests/unit/test_pinning_header_parsing.js
security/manager/ssl/tests/unit/test_sss_eviction.js
security/manager/ssl/tests/unit/test_sss_savestate.js
security/manager/ssl/tests/unit/test_sts_fqdn.js
security/manager/ssl/tests/unit/test_sts_holepunch.js
security/manager/ssl/tests/unit/test_sts_ipv4_ipv6.js
security/manager/ssl/tests/unit/test_sts_preload_dynamic.js
security/manager/ssl/tests/unit/test_sts_preloadlist_perwindowpb.js
security/manager/tools/getHSTSPreloadList.js
services/common/rest.js
services/common/tests/unit/head_global.js
services/common/utils.js
services/crypto/tests/unit/head_helpers.js
services/fxaccounts/FxAccountsOAuthClient.jsm
services/fxaccounts/FxAccountsWebChannel.jsm
services/sync/modules/browserid_identity.js
services/sync/tests/unit/head_appinfo.js
services/sync/tests/unit/test_addon_utils.js
services/sync/tests/unit/test_addons_store.js
services/sync/tests/unit/test_bookmark_invalid.js
services/sync/tests/unit/test_resource.js
services/sync/tests/unit/test_resource_async.js
services/sync/tps/extensions/mozmill/resource/stdlib/httpd.js
services/sync/tps/extensions/mozmill/resource/stdlib/securable-module.js
services/sync/tps/extensions/mozmill/resource/stdlib/utils.js
services/sync/tps/extensions/tps/resource/modules/bookmarks.jsm
services/sync/tps/extensions/tps/resource/modules/history.jsm
testing/mochitest/chrome-harness.js
testing/mochitest/jetpack-addon-harness.js
testing/mochitest/jetpack-package-harness.js
testing/specialpowers/content/SpecialPowersObserverAPI.js
testing/specialpowers/content/specialpowersAPI.js
testing/talos/talos/pageloader/chrome/pageloader.js
testing/talos/talos/tests/tabswitch/content/tabswitch-content-process.js
uriloader/exthandler/nsWebHandlerApp.js
uriloader/exthandler/tests/mochitest/handlerApps.js
uriloader/exthandler/tests/mochitest/head.js
uriloader/exthandler/tests/unit/test_punycodeURIs.js
--- a/addon-sdk/source/app-extension/bootstrap.js
+++ b/addon-sdk/source/app-extension/bootstrap.js
@@ -111,17 +111,17 @@ function startup(data, reasonCode) {
 
     let domain = id.
       toLowerCase().
       replace(/@/g, '-at-').
       replace(/\./g, '-dot-').
       replace(uuidRe, '$1');
 
     let prefixURI = 'resource://' + domain + '/';
-    let resourcesURI = ioService.newURI(rootURI + '/resources/', null, null);
+    let resourcesURI = ioService.newURI(rootURI + '/resources/');
     setResourceSubstitution(domain, resourcesURI);
 
     // Create path to URLs mapping supported by loader.
     let paths = {
       // Relative modules resolve to add-on package lib
       './': prefixURI + name + '/lib/',
       './tests/': prefixURI + name + '/tests/',
       '': 'resource://gre/modules/commonjs/'
@@ -174,17 +174,17 @@ function startup(data, reasonCode) {
 
       // On mobile, file URI has to end with a `/` otherwise, setSubstitution
       // takes the parent folder instead.
       if (fileURI[fileURI.length-1] !== '/')
         fileURI += '/';
 
       // Maps the given file:// URI to a resource:// in order to avoid various
       // failure that happens with file:// URI and be close to production env
-      let resourcesURI = ioService.newURI(fileURI, null, null);
+      let resourcesURI = ioService.newURI(fileURI);
       let resName = 'extensions.modules.' + domain + '.commonjs.path' + name;
       setResourceSubstitution(resName, resourcesURI);
 
       result[path] = 'resource://' + resName + '/';
       return result;
     }, paths);
 
     // Make version 2 of the manifest
--- a/addon-sdk/source/lib/dev/toolbox.js
+++ b/addon-sdk/source/lib/dev/toolbox.js
@@ -22,17 +22,17 @@ const { gDevTools } = Cu.import("resourc
 // shipped in nightly, after which it can be removed. Bug 1038517
 const registerSDKURI = () => {
   const ioService = Cc['@mozilla.org/network/io-service;1']
                       .getService(Ci.nsIIOService);
   const resourceHandler = ioService.getProtocolHandler("resource")
                                    .QueryInterface(Ci.nsIResProtocolHandler);
 
   const uri = module.uri.replace("dev/toolbox.js", "");
-  resourceHandler.setSubstitution("sdk", ioService.newURI(uri, null, null));
+  resourceHandler.setSubstitution("sdk", ioService.newURI(uri));
 };
 
 registerSDKURI();
 
 const Tool = Class({
   extends: Disposable,
   setup: function(params={}) {
     const { panels } = validate(this, params);
--- a/addon-sdk/source/lib/sdk/test/harness.js
+++ b/addon-sdk/source/lib/sdk/test/harness.js
@@ -275,17 +275,17 @@ function getPotentialLeaks() {
     "resource://pdf.js.components/",
     "resource://services-common/",
     "resource://services-crypto/",
     "resource://services-sync/"
   ];
 
   let ioService = Cc["@mozilla.org/network/io-service;1"].
                  getService(Ci.nsIIOService);
-  let uri = ioService.newURI("chrome://global/content/", "UTF-8", null);
+  let uri = ioService.newURI("chrome://global/content/", "UTF-8");
   let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].
                   getService(Ci.nsIChromeRegistry);
   uri = chromeReg.convertChromeURL(uri);
   let spec = uri.spec;
   let pos = spec.indexOf("!/");
   GOOD_BASE_URLS.push(spec.substring(0, pos + 2));
 
   let zoneRegExp = new RegExp("^explicit/js-non-window/zones/zone[^/]+/compartment\\((.+)\\)");
--- a/addon-sdk/source/lib/sdk/uri/resource.js
+++ b/addon-sdk/source/lib/sdk/uri/resource.js
@@ -12,17 +12,17 @@ const ioService = Cc["@mozilla.org/netwo
                   getService(Ci.nsIIOService);
 const resourceHandler = ioService.getProtocolHandler("resource").
                         QueryInterface(Ci.nsIResProtocolHandler);
 
 const URI = (uri, base=null) =>
   ioService.newURI(uri, null, base && URI(base))
 
 const mount = (domain, uri) =>
-  resourceHandler.setSubstitution(domain, ioService.newURI(uri, null, null));
+  resourceHandler.setSubstitution(domain, ioService.newURI(uri));
 exports.mount = mount;
 
 const unmount = (domain, uri) =>
   resourceHandler.setSubstitution(domain, null);
 exports.unmount = unmount;
 
 const domain = 1;
 const path = 2;
--- a/addon-sdk/source/lib/sdk/url.js
+++ b/addon-sdk/source/lib/sdk/url.js
@@ -22,17 +22,17 @@ var resProt = ios.getProtocolHandler("re
 
 var URLParser = Cc["@mozilla.org/network/url-parser;1?auth=no"]
                 .getService(Ci.nsIURLParser);
 
 const { Services } = Cu.import("resource://gre/modules/Services.jsm");
 
 function newURI(uriStr, base) {
   try {
-    let baseURI = base ? ios.newURI(base, null, null) : null;
+    let baseURI = base ? ios.newURI(base) : null;
     return ios.newURI(uriStr, null, baseURI);
   }
   catch (e) {
     if (e.result == Cr.NS_ERROR_MALFORMED_URI) {
       throw new Error("malformed URI: " + uriStr);
     }
     if (e.result == Cr.NS_ERROR_FAILURE ||
         e.result == Cr.NS_ERROR_ILLEGAL_VALUE) {
--- a/addon-sdk/source/lib/sdk/url/utils.js
+++ b/addon-sdk/source/lib/sdk/url/utils.js
@@ -12,17 +12,17 @@ const { Cc, Ci, Cr } = require("chrome")
 const IOService = Cc["@mozilla.org/network/io-service;1"].
                     getService(Ci.nsIIOService);
 const { isValidURI } = require("../url");
 const { method } = require("../../method/core");
 
 function newURI (uri) {
   if (!isValidURI(uri))
     throw new Error("malformed URI: " + uri);
-  return IOService.newURI(uri, null, null);
+  return IOService.newURI(uri);
 }
 exports.newURI = newURI;
 
 var getURL = method('sdk/url:getURL');
 getURL.define(String, url => url);
 getURL.define(function (object) {
   return null;
 });
--- a/addon-sdk/source/lib/sdk/window/utils.js
+++ b/addon-sdk/source/lib/sdk/window/utils.js
@@ -187,17 +187,17 @@ function serializeFeatures(options) {
  */
 function open(uri, options) {
   uri = uri || URI_BROWSER;
   options = options || {};
 
   if (!uri)
     throw new Error('browser.chromeURL is undefined, please provide an explicit uri');
 
-  if (['chrome', 'resource', 'data'].indexOf(io.newURI(uri, null, null).scheme) < 0)
+  if (['chrome', 'resource', 'data'].indexOf(io.newURI(uri).scheme) < 0)
     throw new Error('only chrome, resource and data uris are allowed');
 
   let newWindow = windowWatcher.
     openWindow(options.parent || null,
                uri,
                options.name || null,
                options.features ? serializeFeatures(options.features) : null,
                options.args || null);
--- a/addon-sdk/source/test/addons/content-permissions/httpd.js
+++ b/addon-sdk/source/test/addons/content-permissions/httpd.js
@@ -1641,17 +1641,17 @@ RequestReader.prototype =
       // No absolute paths in the request line in HTTP prior to 1.1
       if (!metadata._httpVersion.atLeast(nsHttpVersion.HTTP_1_1))
         throw HTTP_400;
 
       try
       {
         var uri = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService)
-                    .newURI(fullPath, null, null);
+                    .newURI(fullPath);
         fullPath = uri.path;
         scheme = uri.scheme;
         host = metadata._host = uri.asciiHost;
         port = uri.port;
         if (port === -1)
         {
           if (scheme === "http")
             port = 80;
--- a/addon-sdk/source/test/addons/content-script-messages-latency/httpd.js
+++ b/addon-sdk/source/test/addons/content-script-messages-latency/httpd.js
@@ -1641,17 +1641,17 @@ RequestReader.prototype =
       // No absolute paths in the request line in HTTP prior to 1.1
       if (!metadata._httpVersion.atLeast(nsHttpVersion.HTTP_1_1))
         throw HTTP_400;
 
       try
       {
         var uri = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService)
-                    .newURI(fullPath, null, null);
+                    .newURI(fullPath);
         fullPath = uri.path;
         scheme = uri.scheme;
         host = metadata._host = uri.asciiHost;
         port = uri.port;
         if (port === -1)
         {
           if (scheme === "http")
             port = 80;
--- a/addon-sdk/source/test/addons/e10s-content/lib/httpd.js
+++ b/addon-sdk/source/test/addons/e10s-content/lib/httpd.js
@@ -1642,17 +1642,17 @@ RequestReader.prototype =
       // No absolute paths in the request line in HTTP prior to 1.1
       if (!metadata._httpVersion.atLeast(nsHttpVersion.HTTP_1_1))
         throw HTTP_400;
 
       try
       {
         var uri = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService)
-                    .newURI(fullPath, null, null);
+                    .newURI(fullPath);
         fullPath = uri.path;
         scheme = uri.scheme;
         host = metadata._host = uri.asciiHost;
         port = uri.port;
         if (port === -1)
         {
           if (scheme === "http")
             port = 80;
--- a/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js
+++ b/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js
@@ -101,17 +101,17 @@ function startup(data, reasonCode) {
 
     let domain = id.
       toLowerCase().
       replace(/@/g, '-at-').
       replace(/\./g, '-dot-').
       replace(uuidRe, '$1');
 
     let prefixURI = 'resource://' + domain + '/';
-    let resourcesURI = ioService.newURI(rootURI + '/resources/', null, null);
+    let resourcesURI = ioService.newURI(rootURI + '/resources/');
     resourceHandler.setSubstitution(domain, resourcesURI);
 
     // Create path to URLs mapping supported by loader.
     let paths = {
       // Relative modules resolve to add-on package lib
       './': prefixURI + name + '/lib/',
       './tests/': prefixURI + name + '/tests/',
       '': 'resource://gre/modules/commonjs/'
@@ -164,17 +164,17 @@ function startup(data, reasonCode) {
 
       // On mobile, file URI has to end with a `/` otherwise, setSubstitution
       // takes the parent folder instead.
       if (fileURI[fileURI.length-1] !== '/')
         fileURI += '/';
 
       // Maps the given file:// URI to a resource:// in order to avoid various
       // failure that happens with file:// URI and be close to production env
-      let resourcesURI = ioService.newURI(fileURI, null, null);
+      let resourcesURI = ioService.newURI(fileURI);
       let resName = 'extensions.modules.' + domain + '.commonjs.path' + name;
       resourceHandler.setSubstitution(resName, resourcesURI);
 
       result[path] = 'resource://' + resName + '/';
       return result;
     }, paths);
 
     // Make version 2 of the manifest
--- a/addon-sdk/source/test/addons/places/lib/httpd.js
+++ b/addon-sdk/source/test/addons/places/lib/httpd.js
@@ -1641,17 +1641,17 @@ RequestReader.prototype =
       // No absolute paths in the request line in HTTP prior to 1.1
       if (!metadata._httpVersion.atLeast(nsHttpVersion.HTTP_1_1))
         throw HTTP_400;
 
       try
       {
         var uri = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService)
-                    .newURI(fullPath, null, null);
+                    .newURI(fullPath);
         fullPath = uri.path;
         scheme = uri.scheme;
         host = metadata._host = uri.asciiHost;
         port = uri.port;
         if (port === -1)
         {
           if (scheme === "http")
             port = 80;
--- a/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js
+++ b/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js
@@ -101,17 +101,17 @@ function startup(data, reasonCode) {
 
     let domain = id.
       toLowerCase().
       replace(/@/g, '-at-').
       replace(/\./g, '-dot-').
       replace(uuidRe, '$1');
 
     let prefixURI = 'resource://' + domain + '/';
-    let resourcesURI = ioService.newURI(rootURI + '/resources/', null, null);
+    let resourcesURI = ioService.newURI(rootURI + '/resources/');
     resourceHandler.setSubstitution(domain, resourcesURI);
 
     // Create path to URLs mapping supported by loader.
     let paths = {
       // Relative modules resolve to add-on package lib
       './': prefixURI + name + '/lib/',
       './tests/': prefixURI + name + '/tests/',
       '': 'resource://gre/modules/commonjs/'
@@ -164,17 +164,17 @@ function startup(data, reasonCode) {
 
       // On mobile, file URI has to end with a `/` otherwise, setSubstitution
       // takes the parent folder instead.
       if (fileURI[fileURI.length-1] !== '/')
         fileURI += '/';
 
       // Maps the given file:// URI to a resource:// in order to avoid various
       // failure that happens with file:// URI and be close to production env
-      let resourcesURI = ioService.newURI(fileURI, null, null);
+      let resourcesURI = ioService.newURI(fileURI);
       let resName = 'extensions.modules.' + domain + '.commonjs.path' + name;
       resourceHandler.setSubstitution(resName, resourcesURI);
 
       result[path] = 'resource://' + resName + '/';
       return result;
     }, paths);
 
     // Make version 2 of the manifest
--- a/addon-sdk/source/test/lib/httpd.js
+++ b/addon-sdk/source/test/lib/httpd.js
@@ -1642,17 +1642,17 @@ RequestReader.prototype =
       // No absolute paths in the request line in HTTP prior to 1.1
       if (!metadata._httpVersion.atLeast(nsHttpVersion.HTTP_1_1))
         throw HTTP_400;
 
       try
       {
         var uri = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService)
-                    .newURI(fullPath, null, null);
+                    .newURI(fullPath);
         fullPath = uri.path;
         scheme = uri.scheme;
         host = metadata._host = uri.asciiHost;
         port = uri.port;
         if (port === -1)
         {
           if (scheme === "http")
             port = 80;
--- a/addon-sdk/source/test/test-system-events.js
+++ b/addon-sdk/source/test/test-system-events.js
@@ -142,17 +142,17 @@ exports["test alive listeners are remove
   assert.equal(receivedFromWeak.length, 1, "weak listener was removed");
   assert.equal(receivedFromStrong.length, 1, "strong listener was removed");
 };
 
 exports["test handle nsIObserverService notifications"] = function(assert) {
   let ios = Cc['@mozilla.org/network/io-service;1']
             .getService(Ci.nsIIOService);
 
-  let uri = ios.newURI("http://www.foo.com", null, null);
+  let uri = ios.newURI("http://www.foo.com");
 
   let type = Date.now().toString(32);
   let timesCalled = 0;
   let lastSubject = null;
   let lastData = null;
   let lastType = null;
 
   function handler({ subject, data, type }) {
@@ -206,17 +206,17 @@ exports["test handle nsIObserverService 
 
   assert.equal(timesCalled, 3, "* event handler is removed");
 };
 
 exports["test emit to nsIObserverService observers"] = function(assert) {
   let ios = Cc['@mozilla.org/network/io-service;1']
             .getService(Ci.nsIIOService);
 
-  let uri = ios.newURI("http://www.foo.com", null, null);
+  let uri = ios.newURI("http://www.foo.com");
   let timesCalled = 0;
   let lastSubject = null;
   let lastData = null;
   let lastTopic = null;
 
   var topic = Date.now().toString(32)
   let nsIObserver = {
     QueryInterface: function() {
--- a/addon-sdk/source/test/test-traceback.js
+++ b/addon-sdk/source/test/test-traceback.js
@@ -5,17 +5,17 @@
 
 var traceback = require("sdk/console/traceback");
 var {Cc,Ci,Cr,Cu} = require("chrome");
 const { on, off } = require("sdk/system/events");
 
 function throwNsIException() {
   var ios = Cc['@mozilla.org/network/io-service;1']
             .getService(Ci.nsIIOService);
-  ios.newURI("i'm a malformed URI", null, null);
+  ios.newURI("i'm a malformed URI");
 }
 
 function throwError() {
   throw new Error("foob");
 }
 
 exports.testFormatDoesNotFetchRemoteFiles = function(assert) {
   ["http", "https"].forEach(
--- a/addon-sdk/source/test/test-xpcom.js
+++ b/addon-sdk/source/test/test-xpcom.js
@@ -136,18 +136,17 @@ function testRegister(assert, text) {
       get wrappedJSObject() {
         return this;
       },
       interfaces: [ 'nsIAboutModule' ],
       newChannel : function(aURI, aLoadInfo) {
         var ios = Cc["@mozilla.org/network/io-service;1"].
                   getService(Ci.nsIIOService);
 
-        var uri = ios.newURI("data:text/plain;charset=utf-8," + text,
-                             null, null);
+        var uri = ios.newURI("data:text/plain;charset=utf-8," + text);
         var channel = ios.newChannelFromURIWithLoadInfo(uri, aLoadInfo);
 
         channel.originalURI = aURI;
         return channel;
       },
       getURIFlags: function(aURI) {
         return Ci.nsIAboutModule.ALLOW_SCRIPT;
       }
@@ -159,17 +158,17 @@ function testRegister(assert, text) {
   assert.equal(isCIDRegistered(service.id), true);
 
   var aboutFactory = xpcom.factoryByContract(service.contract);
   var about = aboutFactory.createInstance(Ci.nsIAboutModule);
 
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
   assert.equal(
-    about.getURIFlags(ios.newURI("http://foo.com", null, null)),
+    about.getURIFlags(ios.newURI("http://foo.com")),
     Ci.nsIAboutModule.ALLOW_SCRIPT
   );
 
   var channel = NetUtil.newChannel({
     uri: "about:boop",
     loadUsingSystemPrincipal: true
   });
   var iStream = channel.open2();
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -602,19 +602,17 @@ var shell = {
               return;
             }
             return;
           }
 
           Services.perms.addFromPrincipal(principal, 'offline-app',
                                           Ci.nsIPermissionManager.ALLOW_ACTION);
 
-          let documentURI = Services.io.newURI(contentWindow.document.documentURI,
-                                               null,
-                                               null);
+          let documentURI = Services.io.newURI(contentWindow.document.documentURI);
           let manifestURI = Services.io.newURI(manifest, null, documentURI);
           let updateService = Cc['@mozilla.org/offlinecacheupdate-service;1']
                               .getService(Ci.nsIOfflineCacheUpdateService);
           updateService.scheduleUpdate(manifestURI, documentURI, principal, window);
         } catch (e) {
           dump('Error while creating offline cache: ' + e + '\n');
         }
         break;
@@ -814,26 +812,26 @@ var CustomEventManager = {
       case 'inputregistry-remove':
         KeyboardHelper.handleEvent(detail);
         break;
       case 'copypaste-do-command':
         Services.obs.notifyObservers({ wrappedJSObject: shell.contentBrowser },
                                      'ask-children-to-execute-copypaste-command', detail.cmd);
         break;
       case 'add-permission':
-        Services.perms.add(Services.io.newURI(detail.uri, null, null),
+        Services.perms.add(Services.io.newURI(detail.uri),
                            detail.permissionType, permissionMap.get(detail.permission));
         break;
       case 'remove-permission':
-        Services.perms.remove(Services.io.newURI(detail.uri, null, null),
+        Services.perms.remove(Services.io.newURI(detail.uri),
                               detail.permissionType);
         break;
       case 'test-permission':
         let result = Services.perms.testExactPermission(
-          Services.io.newURI(detail.uri, null, null), detail.permissionType);
+          Services.io.newURI(detail.uri), detail.permissionType);
         // Not equal check here because we want to prevent default only if it's not set
         if (result !== permissionMapRev.get(detail.permission)) {
           evt.preventDefault();
         }
         break;
       case 'shutdown-application':
         let appStartup = Cc['@mozilla.org/toolkit/app-startup;1']
                            .getService(Ci.nsIAppStartup);
--- a/b2g/chrome/content/shell_remote.js
+++ b/b2g/chrome/content/shell_remote.js
@@ -15,17 +15,17 @@ function debug(aStr) {
   // dump(" -*- ShellRemote.js: " + aStr + "\n");
 }
 
 var remoteShell = {
 
   _started: false,
 
   get homeURL() {
-    let systemAppManifestURL = Services.io.newURI(this.systemAppManifestURL, null, null);
+    let systemAppManifestURL = Services.io.newURI(this.systemAppManifestURL);
     let shellRemoteURL = Services.prefs.getCharPref("b2g.multiscreen.system_remote_url");
     shellRemoteURL = Services.io.newURI(shellRemoteURL, null, systemAppManifestURL);
     return shellRemoteURL.spec;
   },
 
   get systemAppManifestURL() {
     return Services.prefs.getCharPref("b2g.system_manifest_url");
   },
--- a/b2g/components/AboutServiceWorkers.jsm
+++ b/b2g/components/AboutServiceWorkers.jsm
@@ -146,17 +146,17 @@ this.AboutServiceWorkers = {
             !message.principal.originAttributes.appId ||
             (message.principal.originAttributes.inIsolatedMozBrowser == null)) {
           self.sendError(message.id, "MissingPrincipal");
           return;
         }
 
         let principal = Services.scriptSecurityManager.createCodebasePrincipal(
           // TODO: Bug 1196652. use originNoSuffix
-          Services.io.newURI(message.principal.origin, null, null),
+          Services.io.newURI(message.principal.origin),
           message.principal.originAttributes);
 
         if (!message.scope) {
           self.sendError(message.id, "MissingScope");
           return;
         }
 
         let serviceWorkerUnregisterCallback = {
--- a/b2g/components/B2GAboutRedirector.js
+++ b/b2g/components/B2GAboutRedirector.js
@@ -8,17 +8,17 @@ Components.utils.import("resource://gre/
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 function debug(msg) {
   //dump("B2GAboutRedirector: " + msg + "\n");
 }
 
 function netErrorURL() {
   let systemManifestURL = Services.prefs.getCharPref("b2g.system_manifest_url");
-  systemManifestURL = Services.io.newURI(systemManifestURL, null, null);
+  systemManifestURL = Services.io.newURI(systemManifestURL);
   let netErrorURL = Services.prefs.getCharPref("b2g.neterror.url");
   netErrorURL = Services.io.newURI(netErrorURL, null, systemManifestURL);
   return netErrorURL.spec;
 }
 
 var modules = {
   certerror: {
     uri: "chrome://b2g/content/aboutCertError.xhtml",
@@ -53,17 +53,17 @@ B2GAboutRedirector.prototype = {
   },
 
   newChannel: function(aURI, aLoadInfo) {
     let moduleInfo = this._getModuleInfo(aURI);
 
     var ios = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
 
-    var newURI = ios.newURI(moduleInfo.uri, null, null);
+    var newURI = ios.newURI(moduleInfo.uri);
 
     var channel = ios.newChannelFromURIWithLoadInfo(newURI, aLoadInfo);
 
     if (!moduleInfo.privileged) {
       // Setting the owner to null means that we'll go through the normal
       // path in GetChannelPrincipal and create a codebase principal based
       // on the channel's originalURI
       channel.owner = null;
--- a/b2g/components/ErrorPage.jsm
+++ b/b2g/components/ErrorPage.jsm
@@ -133,17 +133,17 @@ SSLExceptions.prototype = {
 };
 
 var ErrorPage = {
   _addCertException: function(aMessage) {
     let frameLoaderOwner = aMessage.target.QueryInterface(Ci.nsIFrameLoaderOwner);
     let win = frameLoaderOwner.ownerDocument.defaultView;
     let mm = frameLoaderOwner.frameLoader.messageManager;
 
-    let uri = Services.io.newURI(aMessage.data.url, null, null);
+    let uri = Services.io.newURI(aMessage.data.url);
     let sslExceptions = new SSLExceptions((function() {
       mm.sendAsyncMessage('ErrorPage:ReloadPage');
     }).bind(this), uri, win);
     try {
       sslExceptions.addException(!aMessage.data.isPermanent);
     } catch (e) {
       dump("Failed to set cert exception: " + e + "\n");
     }
--- a/b2g/components/SafeMode.jsm
+++ b/b2g/components/SafeMode.jsm
@@ -66,17 +66,17 @@ this.SafeMode = {
     debug("Starting in Safe Mode!");
 
     // Load $system_app/safe_mode.html as a full screen iframe, and wait for
     // the user to make a choice.
     let shell = SafeMode.window.shell;
     let document = SafeMode.window.document;
     SafeMode.window.screen.mozLockOrientation("portrait");
 
-    let url = Services.io.newURI(shell.homeURL, null, null)
+    let url = Services.io.newURI(shell.homeURL)
                          .resolve(kSafeModePage);
     debug("Registry is ready, loading " + url);
     let frame = document.createElementNS("http://www.w3.org/1999/xhtml", "html:iframe");
     frame.setAttribute("mozbrowser", "true");
     frame.setAttribute("id", "systemapp"); // To keep screen.js happy.
     let contentBrowser = document.body.appendChild(frame);
 
     return new Promise((aResolve, aReject) => {
--- a/caps/tests/unit/test_origin.js
+++ b/caps/tests/unit/test_origin.js
@@ -1,15 +1,15 @@
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 var ssm = Services.scriptSecurityManager;
-function makeURI(uri) { return Services.io.newURI(uri, null, null); }
+function makeURI(uri) { return Services.io.newURI(uri); }
 
 function checkThrows(f) {
   var threw = false;
   try { f(); } catch (e) { threw = true }
   do_check_true(threw);
 }
 
 function checkCrossOrigin(a, b) {
--- a/chrome/test/unit/test_bug292789.js
+++ b/chrome/test/unit/test_bug292789.js
@@ -9,17 +9,17 @@ const MANIFESTS = [
 
 registerManifests(MANIFESTS);
 
 var gIOS;
 var gCR;
 
 function check_accessibility(spec, desired)
 {
-  var uri = gIOS.newURI(spec, null, null);
+  var uri = gIOS.newURI(spec);
   var actual = gCR.allowContentToAccess(uri);
   do_check_eq(desired, actual);
 }
 
 function run_test()
 {
   gIOS = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
--- a/chrome/test/unit/test_bug380398.js
+++ b/chrome/test/unit/test_bug380398.js
@@ -24,31 +24,29 @@ var chromeReg = Cc["@mozilla.org/chrome/
                  .getService(Ci.nsIChromeRegistry);
 chromeReg.checkForNewChrome();
 
 var target = gIOS.newFileURI(do_get_file("data"));
 target = target.spec + "test/test.xul";
 
 function test_succeeded_mapping(namespace)
 {
-  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul",
-                        null, null);
+  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
   try {
     var result = chromeReg.convertChromeURL(uri);
     do_check_eq(result.spec, target);
   }
   catch (ex) {
     do_throw(namespace);
   }
 }
 
 function test_failed_mapping(namespace)
 {
-  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul",
-                        null, null);
+  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
   try {
     var result = chromeReg.convertChromeURL(uri);
     do_throw(namespace);
   }
   catch (ex) {
   }
 }
 
--- a/chrome/test/unit/test_bug397073.js
+++ b/chrome/test/unit/test_bug397073.js
@@ -24,31 +24,29 @@ var chromeReg = Cc["@mozilla.org/chrome/
                  .getService(Ci.nsIChromeRegistry);
 chromeReg.checkForNewChrome();
 
 var target = gIOS.newFileURI(do_get_file("data"));
 target = target.spec + "test/test.xul";
 
 function test_succeeded_mapping(namespace)
 {
-  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul",
-                        null, null);
+  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
   try {
     var result = chromeReg.convertChromeURL(uri);
     do_check_eq(result.spec, target);
   }
   catch (ex) {
     do_throw(namespace);
   }
 }
 
 function test_failed_mapping(namespace)
 {
-  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul",
-                        null, null);
+  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
   try {
     var result = chromeReg.convertChromeURL(uri);
     do_throw(namespace);
   }
   catch (ex) {
   }
 }
 
--- a/chrome/test/unit/test_bug399707.js
+++ b/chrome/test/unit/test_bug399707.js
@@ -23,31 +23,29 @@ var chromeReg = Cc["@mozilla.org/chrome/
                  .getService(Ci.nsIChromeRegistry);
 chromeReg.checkForNewChrome();
 
 var target = gIOS.newFileURI(do_get_file("data"));
 target = target.spec + "test/test.xul";
 
 function test_succeeded_mapping(namespace)
 {
-  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul",
-                        null, null);
+  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
   try {
     var result = chromeReg.convertChromeURL(uri);
     do_check_eq(result.spec, target);
   }
   catch (ex) {
     do_throw(namespace);
   }
 }
 
 function test_failed_mapping(namespace)
 {
-  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul",
-                        null, null);
+  var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
   try {
     var result = chromeReg.convertChromeURL(uri);
     do_throw(namespace);
   }
   catch (ex) {
   }
 }
 
--- a/chrome/test/unit/test_bug401153.js
+++ b/chrome/test/unit/test_bug401153.js
@@ -25,17 +25,17 @@ chromeReg.checkForNewChrome();
 
 var rph = gIOS.getProtocolHandler("resource")
               .QueryInterface(Ci.nsIResProtocolHandler);
 
 function test_succeeded_mapping(namespace, target)
 {
   try {
     do_check_true(rph.hasSubstitution(namespace));
-    var uri = gIOS.newURI("resource://" + namespace, null, null);
+    var uri = gIOS.newURI("resource://" + namespace);
     dump("### checking for " + target + ", getting " + rph.resolveURI(uri) + "\n");
     do_check_eq(rph.resolveURI(uri), target);
   }
   catch (ex) {
     dump(ex + "\n");
     do_throw(namespace);
   }
 }
--- a/chrome/test/unit/test_bug415367.js
+++ b/chrome/test/unit/test_bug415367.js
@@ -7,17 +7,17 @@ var gIOS = Cc["@mozilla.org/network/io-s
             .getService(Ci.nsIIOService);
 
 function test_uri(obj)
 {
   var uri = null;
   var failed = false;
   var message = "";
   try {
-    uri = gIOS.newURI(obj.uri, null, null);
+    uri = gIOS.newURI(obj.uri);
     if (!obj.result) {
       failed = true;
       message = obj.uri + " should not be accepted as a valid URI";
     }
   }
   catch (ex) {
     if (obj.result) {
       failed = true;
--- a/chrome/test/unit/test_bug564667.js
+++ b/chrome/test/unit/test_bug564667.js
@@ -12,32 +12,32 @@ var gIOS = Cc["@mozilla.org/network/io-s
 var gCR = Cc["@mozilla.org/chrome/chrome-registry;1"].
           getService(Ci.nsIChromeRegistry).
           QueryInterface(Ci.nsIXULOverlayProvider);
 
 /*
  * Checks that a mapping was added
  */
 function test_mapping(chromeURL, target) {
-  var uri = gIOS.newURI(chromeURL, null, null);
+  var uri = gIOS.newURI(chromeURL);
 
   try {
     var result = gCR.convertChromeURL(uri);
     do_check_eq(result.spec, target);
   }
   catch (ex) {
     do_throw(chromeURL + " not Registered");
   }
 }
 
 /*
  * Checks that a mapping was removed
  */
 function test_removed_mapping(chromeURL, target) {
-  var uri = gIOS.newURI(chromeURL, null, null);
+  var uri = gIOS.newURI(chromeURL);
   try {
     var result = gCR.convertChromeURL(uri);
     do_throw(chromeURL + " not removed");
   }
   catch (ex) {
     // This should throw
   }
 }
@@ -45,17 +45,17 @@ function test_removed_mapping(chromeURL,
 /*
  * Checks if any overlay was added after loading
  * the manifest files
  *
  * @param type The type of overlay: overlay|style
  */
 function test_no_overlays(chromeURL, target, type) {
   var type = type || "overlay";
-  var uri = gIOS.newURI(chromeURL, null, null);
+  var uri = gIOS.newURI(chromeURL);
   var present = false, elem;
 
   var overlays = (type == "overlay") ?
       gCR.getXULOverlays(uri) : gCR.getStyleOverlays(uri);
 
   // We shouldn't be allowed to register overlays nor styles
   if (overlays.hasMoreElements()) {
     if (type == "styles")
--- a/chrome/test/unit/test_crlf.js
+++ b/chrome/test/unit/test_crlf.js
@@ -2,14 +2,14 @@ registerManifests([do_get_file("data/tes
 
 function run_test()
 {
   let cr = Cc["@mozilla.org/chrome/chrome-registry;1"].
     getService(Ci.nsIChromeRegistry);
 
   let ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
-  let sourceURI = ios.newURI("chrome://test_crlf/content/", null, null);
+  let sourceURI = ios.newURI("chrome://test_crlf/content/");
   // this throws for packages that are not registered
   let file = cr.convertChromeURL(sourceURI).QueryInterface(Ci.nsIFileURL).file;
   
   do_check_true(file.equals(do_get_file("data/test_crlf.xul", true)));
 }
--- a/chrome/test/unit/test_data_protocol_registration.js
+++ b/chrome/test/unit/test_data_protocol_registration.js
@@ -40,17 +40,17 @@ function run_test()
   cr.checkForNewChrome();
 
   // Check that our override worked
   let expectedURI = "data:application/vnd.mozilla.xul+xml,";
   let sourceURI = "chrome://good-package/content/test.xul";
   try {
     let ios = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
-    sourceURI = ios.newURI(sourceURI, null, null);
+    sourceURI = ios.newURI(sourceURI);
     // this throws for packages that are not registered
     let uri = cr.convertChromeURL(sourceURI).spec;
 
     do_check_eq(expectedURI, uri);
   }
   catch (e) {
     dump(e + "\n");
     do_throw("Should have registered our URI!");
--- a/chrome/test/unit/test_no_remote_registration.js
+++ b/chrome/test/unit/test_no_remote_registration.js
@@ -155,17 +155,17 @@ function run_test()
           break;
         case "resource":
           sourceURI = "resource://" + protocol.scheme + "/";
           break;
       };
       try {
         let ios = Cc["@mozilla.org/network/io-service;1"].
                   getService(Ci.nsIIOService);
-        sourceURI = ios.newURI(sourceURI, null, null);
+        sourceURI = ios.newURI(sourceURI);
         let uri;
         if (type == "resource") {
           // resources go about a slightly different way than everything else
           let rph = ios.getProtocolHandler("resource").
                     QueryInterface(Ci.nsIResProtocolHandler);
           // this throws for packages that are not registered
           uri = rph.resolveURI(sourceURI);
         }
--- a/chrome/test/unit/test_resolve_uris.js
+++ b/chrome/test/unit/test_resolve_uris.js
@@ -59,17 +59,17 @@ function do_run_test()
         expectedURI += "override-me.xul";
         break;
       case "resource":
         expectedURI = ios.newFileURI(manifestFile.parent).spec;
         sourceURI = "resource://foo/";
         break;
     };
     try {
-      sourceURI = ios.newURI(sourceURI, null, null);
+      sourceURI = ios.newURI(sourceURI);
       let uri;
       if (type == "resource") {
         // resources go about a slightly different way than everything else
         let rph = ios.getProtocolHandler("resource").
             QueryInterface(Ci.nsIResProtocolHandler);
         uri = rph.resolveURI(sourceURI);
       }
       else {
--- a/docshell/test/unit/test_bug442584.js
+++ b/docshell/test/unit/test_bug442584.js
@@ -4,27 +4,27 @@ var ios = Cc["@mozilla.org/network/io-se
           getService(Ci.nsIIOService);
 var prefs = Cc["@mozilla.org/preferences-service;1"].
             getService(Ci.nsIPrefBranch);
 
 function run_test() {
   // Fill up the queue
   prefs.setBoolPref("network.prefetch-next", true);
   for (var i = 0; i < 5; i++) {
-    var uri = ios.newURI("http://localhost/" + i, null, null);
+    var uri = ios.newURI("http://localhost/" + i);
     prefetch.prefetchURI(uri, uri, null, true);
   }
 
   // Make sure the queue has items in it...
   do_check_true(prefetch.hasMoreElements());
 
   // Now disable the pref to force the queue to empty...
   prefs.setBoolPref("network.prefetch-next", false);
   do_check_false(prefetch.hasMoreElements());
 
   // Now reenable the pref, and add more items to the queue.
   prefs.setBoolPref("network.prefetch-next", true);
   for (var i = 0; i < 5; i++) {
-    var uri = ios.newURI("http://localhost/" + i, null, null);
+    var uri = ios.newURI("http://localhost/" + i);
     prefetch.prefetchURI(uri, uri, null, true);
   }
   do_check_true(prefetch.hasMoreElements());
 }
--- a/docshell/test/unit/test_nsIDownloadHistory.js
+++ b/docshell/test/unit/test_nsIDownloadHistory.js
@@ -11,17 +11,17 @@ XPCOMUtils.defineLazyGetter(this, "Servi
   return Services;
 });
 
 function testLinkVistedObserver()
 {
   const NS_LINK_VISITED_EVENT_TOPIC = "link-visited";
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  var testURI = ios.newURI("http://google.com/", null, null);
+  var testURI = ios.newURI("http://google.com/");
 
   var gh = Cc["@mozilla.org/browser/global-history;2"].
            getService(Ci.nsIGlobalHistory2);
   do_check_false(gh.isVisited(testURI));
 
   var topicReceived = false;
   var obs = {
     observe: function tlvo_observe(aSubject, aTopic, aData)
--- a/dom/base/contentAreaDropListener.js
+++ b/dom/base/contentAreaDropListener.js
@@ -104,32 +104,32 @@ ContentAreaDropListener.prototype =
     uriString = uriString.replace(/^\s*|\s*$/g, '');
 
     let uri;
     let ioService = Cc["@mozilla.org/network/io-service;1"]
                       .getService(Components.interfaces.nsIIOService);
     try {
       // Check that the uri is valid first and return an empty string if not.
       // It may just be plain text and should be ignored here
-      uri = ioService.newURI(uriString, null, null);
+      uri = ioService.newURI(uriString);
     } catch (ex) { }
     if (!uri)
       return uriString;
 
     // uriString is a valid URI, so do the security check.
     let secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].
                    getService(Ci.nsIScriptSecurityManager);
     let sourceNode = dataTransfer.mozSourceNode;
     let flags = secMan.STANDARD;
     if (disallowInherit)
       flags |= secMan.DISALLOW_INHERIT_PRINCIPAL;
 
     // Use file:/// as the default uri so that drops of file URIs are always allowed
     let principal = sourceNode ? sourceNode.nodePrincipal
-                               : secMan.createCodebasePrincipal(ioService.newURI("file:///", null, null), {});
+                               : secMan.createCodebasePrincipal(ioService.newURI("file:///"), {});
 
     secMan.checkLoadURIStrWithPrincipal(principal, uriString, flags);
 
     return uriString;
   },
 
   canDropLink: function(aEvent, aAllowSameDocument)
   {
--- a/dom/base/test/unit/test_cancelPrefetch.js
+++ b/dom/base/test/unit/test_cancelPrefetch.js
@@ -29,17 +29,17 @@ function run_test() {
   node1 = doc.getElementById("node1");
   node2 = doc.getElementById("node2");
 
   run_next_test();
 }
 
 add_test(function test_cancel1() {
 
-  var uri = ios.newURI("http://localhost/1", null, null);
+  var uri = ios.newURI("http://localhost/1");
   prefetch.prefetchURI(uri, uri, node1, true);
 
   do_check_true(prefetch.hasMoreElements(), 'There is a request in the queue');
 
   // Trying to prefetch again the same uri with the same node will fail.
   var didFail = 0;
 
   try {
@@ -60,17 +60,17 @@ add_test(function test_cancel1() {
                                              'queue');
   run_next_test();
 });
 
 add_test(function test_cancel2() {
   // Prefetch a uri with 2 different nodes. There should be 2 request
   // in the queue and canceling one will not cancel the other.
 
-  var uri = ios.newURI("http://localhost/1", null, null);
+  var uri = ios.newURI("http://localhost/1");
   prefetch.prefetchURI(uri, uri, node1, true);
   prefetch.prefetchURI(uri, uri, node2, true);
 
   do_check_true(prefetch.hasMoreElements(), 'There are requests in the queue');
 
   prefetch.cancelPrefetchURI(uri, node1);
 
   do_check_true(prefetch.hasMoreElements(), 'There is still one more request ' +
@@ -80,17 +80,17 @@ add_test(function test_cancel2() {
 
   do_check_false(prefetch.hasMoreElements(), 'There is no request in the queue');
   run_next_test();
 });
 
 add_test(function test_cancel3() {
   // Request a prefetch of a uri. Trying to cancel a prefetch for the same uri
   // with a different node will fail.
-  var uri = ios.newURI("http://localhost/1", null, null);
+  var uri = ios.newURI("http://localhost/1");
   prefetch.prefetchURI(uri, uri, node1, true);
 
   do_check_true(prefetch.hasMoreElements(), 'There is a request in the queue');
 
   var didFail = 0;
 
   try {
     prefetch.cancelPrefetchURI(uri, node2);
@@ -105,18 +105,18 @@ add_test(function test_cancel3() {
   prefetch.cancelPrefetchURI(uri, node1);
   do_check_false(prefetch.hasMoreElements(), 'There is no request in the queue');
   run_next_test();
 });
 
 add_test(function test_cancel4() {
   // Request a prefetch of a uri. Trying to cancel a prefetch for a different uri
   // with the same node will fail.
-  var uri1 = ios.newURI("http://localhost/1", null, null);
-  var uri2 = ios.newURI("http://localhost/2", null, null);
+  var uri1 = ios.newURI("http://localhost/1");
+  var uri2 = ios.newURI("http://localhost/2");
   prefetch.prefetchURI(uri1, uri1, node1, true);
 
   do_check_true(prefetch.hasMoreElements(), 'There is a request in the queue');
 
   var didFail = 0;
 
   try {
     prefetch.cancelPrefetchURI(uri2, node1);
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -1009,17 +1009,17 @@ BrowserElementChild.prototype = {
         sendError("Origin mismatches");
         return;
       }
     }
 
     if (expectedUrl) {
       let expectedURI
       try {
-       expectedURI = Services.io.newURI(expectedUrl, null, null);
+       expectedURI = Services.io.newURI(expectedUrl);
       } catch(e) {
         sendError("Malformed URL");
         return;
       }
       let currentURI = docShell.QueryInterface(Ci.nsIWebNavigation).currentURI;
       if (!currentURI.equalsExceptRef(expectedURI)) {
         sendError("URL mismatches");
         return;
--- a/dom/browser-element/BrowserElementParent.js
+++ b/dom/browser-element/BrowserElementParent.js
@@ -687,17 +687,17 @@ BrowserElementParent.prototype = {
   purgeHistory: defineDOMRequestMethod('purge-history'),
 
 
   download: function(_url, _options) {
     if (!this._isAlive()) {
       return null;
     }
 
-    let uri = Services.io.newURI(_url, null, null);
+    let uri = Services.io.newURI(_url);
     let url = uri.QueryInterface(Ci.nsIURL);
 
     debug('original _options = ' + uneval(_options));
 
     // Ensure we have _options, we always use it to send the filename.
     _options = _options || {};
     if (!_options.filename) {
       _options.filename = url.fileName;
@@ -776,17 +776,17 @@ BrowserElementParent.prototype = {
                                 aOffset, aCount) {
         this.extListener.onDataAvailable(aRequest, aContext, aInputStream,
                                          aOffset, aCount);
       },
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener,
                                              Ci.nsIRequestObserver])
     };
 
-    let referrer = Services.io.newURI(_options.referrer, null, null);
+    let referrer = Services.io.newURI(_options.referrer);
     let principal =
       Services.scriptSecurityManager.createCodebasePrincipal(
         referrer, this._frameLoader.loadContext.originAttributes);
 
     let channel = NetUtil.newChannel({
       uri: url,
       loadingPrincipal: principal,
       securityFlags: SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS,
--- a/dom/browser-element/mochitest/browserElement_Auth.js
+++ b/dom/browser-element/mochitest/browserElement_Auth.js
@@ -154,17 +154,17 @@ function testProxyAuth(e) {
 
 function testAuthJarNoInterfere(e) {
   var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
     .getService(SpecialPowers.Ci.nsIHttpAuthManager);
   var secMan = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
   var ioService = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                   .getService(SpecialPowers.Ci.nsIIOService);
-  var uri = ioService.newURI("http://test/tests/dom/browser-element/mochitest/file_http_401_response.sjs", null, null);
+  var uri = ioService.newURI("http://test/tests/dom/browser-element/mochitest/file_http_401_response.sjs");
 
   // Set a bunch of auth data that should not conflict with the correct auth data already
   // stored in the cache.
   var attrs = {appId: 1};
   var principal = secMan.createCodebasePrincipal(uri, attrs);
   authMgr.setAuthIdentity('http', 'test', -1, 'basic', 'http_realm',
                           'tests/dom/browser-element/mochitest/file_http_401_response.sjs',
                           '', 'httpuser', 'wrongpass', false, principal);
@@ -195,17 +195,17 @@ function testAuthJarNoInterfere(e) {
 
 function testAuthJarInterfere(e) {
   var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
     .getService(SpecialPowers.Ci.nsIHttpAuthManager);
   var secMan = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
   var ioService = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                   .getService(SpecialPowers.Ci.nsIIOService);
-  var uri = ioService.newURI("http://test/tests/dom/browser-element/mochitest/file_http_401_response.sjs", null, null);
+  var uri = ioService.newURI("http://test/tests/dom/browser-element/mochitest/file_http_401_response.sjs");
 
   // Set some auth data that should overwrite the successful stored details.
   var principal = secMan.createCodebasePrincipal(uri, {inIsolatedMozBrowser: true});
   authMgr.setAuthIdentity('http', 'test', -1, 'basic', 'http_realm',
                           'tests/dom/browser-element/mochitest/file_http_401_response.sjs',
                           '', 'httpuser', 'wrongpass', false, principal);
 
   // Will authenticate with correct password, prompt should not be
--- a/dom/html/test/browser_bug649778.js
+++ b/dom/html/test/browser_bug649778.js
@@ -30,17 +30,17 @@ function checkCache(url, inMemory, shoul
         is(status, Components.results.NS_ERROR_CACHE_KEY_NOT_FOUND,
            "Invalid error code");
       }
 
       setTimeout(cb, 0);
     };
   };
 
-  storage.asyncOpenURI(Services.io.newURI(url, null, null), "",
+  storage.asyncOpenURI(Services.io.newURI(url), "",
                        Components.interfaces.nsICacheStorage.OPEN_READONLY,
                        new CheckCacheListener(inMemory, shouldExist));
 }
 function getPopupURL() {
   var sh = popup.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                 .getInterface(Components.interfaces.nsIWebNavigation)
                 .sessionHistory;
 
--- a/dom/indexedDB/test/bug839193.js
+++ b/dom/indexedDB/test/bug839193.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const nsIQuotaManagerService = Components.interfaces.nsIQuotaManagerService;
 
-var gURI = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI("http://localhost", null, null);
+var gURI = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI("http://localhost");
 
 function onUsageCallback(request) {}
 
 function onLoad()
 {
   var quotaManagerService =
     Components.classes["@mozilla.org/dom/quota-manager-service;1"]
               .getService(nsIQuotaManagerService);
--- a/dom/indexedDB/test/head.js
+++ b/dom/indexedDB/test/head.js
@@ -93,46 +93,46 @@ function dispatchEvent(eventName)
 }
 
 function setPermission(url, permission)
 {
   const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
 
   let uri = Components.classes["@mozilla.org/network/io-service;1"]
                       .getService(Components.interfaces.nsIIOService)
-                      .newURI(url, null, null);
+                      .newURI(url);
   let ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
                       .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(uri, {});
 
   Components.classes["@mozilla.org/permissionmanager;1"]
             .getService(nsIPermissionManager)
             .addFromPrincipal(principal, permission,
                               nsIPermissionManager.ALLOW_ACTION);
 }
 
 function removePermission(url, permission)
 {
   let uri = Components.classes["@mozilla.org/network/io-service;1"]
                       .getService(Components.interfaces.nsIIOService)
-                      .newURI(url, null, null);
+                      .newURI(url);
   let ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
                       .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(uri, {});
 
   Components.classes["@mozilla.org/permissionmanager;1"]
             .getService(Components.interfaces.nsIPermissionManager)
             .removeFromPrincipal(principal, permission);
 }
 
 function getPermission(url, permission)
 {
   let uri = Components.classes["@mozilla.org/network/io-service;1"]
                       .getService(Components.interfaces.nsIIOService)
-                      .newURI(url, null, null);
+                      .newURI(url);
   let ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
                       .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(uri, {});
 
   return Components.classes["@mozilla.org/permissionmanager;1"]
                    .getService(Components.interfaces.nsIPermissionManager)
                    .testPermissionFromPrincipal(principal, permission);
 }
--- a/dom/indexedDB/test/unit/test_bad_origin_directory.js
+++ b/dom/indexedDB/test/unit/test_bad_origin_directory.js
@@ -8,17 +8,17 @@ var testGenerator = testSteps();
 function testSteps()
 {
   const url = "ftp://ftp.example.com";
   const name = "test_bad_origin_directory.js";
 
   let ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                          .getService(SpecialPowers.Ci.nsIIOService);
 
-  let uri = ios.newURI(url, null, null);
+  let uri = ios.newURI(url);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   let principal = ssm.createCodebasePrincipal(uri, {});
 
   info("Opening database");
 
--- a/dom/indexedDB/test/unit/test_defaultStorageUpgrade.js
+++ b/dom/indexedDB/test/unit/test_defaultStorageUpgrade.js
@@ -100,17 +100,17 @@ function testSteps()
                          .getService(SpecialPowers.Ci.nsIIOService);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   function openDatabase(params) {
     let request;
     if ("url" in params) {
-      let uri = ios.newURI(params.url, null, null);
+      let uri = ios.newURI(params.url);
       let principal =
         ssm.createCodebasePrincipal(uri,
                                     {appId: params.appId || ssm.NO_APPID,
                                      inIsolatedMozBrowser: params.inIsolatedMozBrowser});
       if ("dbVersion" in params) {
         request = indexedDB.openForPrincipal(principal, params.dbName,
                                              params.dbVersion);
       } else {
--- a/dom/indexedDB/test/unit/test_idbSubdirUpgrade.js
+++ b/dom/indexedDB/test/unit/test_idbSubdirUpgrade.js
@@ -18,17 +18,17 @@ function testSteps()
 
   let ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                          .getService(SpecialPowers.Ci.nsIIOService);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   function openDatabase(params) {
-    let uri = ios.newURI(params.url, null, null);
+    let uri = ios.newURI(params.url);
     let principal =
       ssm.createCodebasePrincipal(uri,
                                   {appId: params.appId || ssm.NO_APPID,
                                    inIsolatedMozBrowser: params.inIsolatedMozBrowser});
     let request = indexedDB.openForPrincipal(principal, params.dbName,
                                              params.dbVersion);
     return request;
   }
--- a/dom/indexedDB/test/unit/test_metadata2Restore.js
+++ b/dom/indexedDB/test/unit/test_metadata2Restore.js
@@ -220,17 +220,17 @@ function testSteps()
                          .getService(SpecialPowers.Ci.nsIIOService);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   function openDatabase(params) {
     let request;
     if ("url" in params) {
-      let uri = ios.newURI(params.url, null, null);
+      let uri = ios.newURI(params.url);
       let principal = ssm.createCodebasePrincipal(uri, params.attrs || {});
       request = indexedDB.openForPrincipal(principal, params.dbName,
                                            params.dbOptions);
     } else {
       request = indexedDB.open(params.dbName, params.dbOptions);
     }
     return request;
   }
--- a/dom/indexedDB/test/unit/test_metadataRestore.js
+++ b/dom/indexedDB/test/unit/test_metadataRestore.js
@@ -61,17 +61,17 @@ function testSteps()
                          .getService(SpecialPowers.Ci.nsIIOService);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   function openDatabase(params) {
     let request;
     if ("url" in params) {
-      let uri = ios.newURI(params.url, null, null);
+      let uri = ios.newURI(params.url);
       let principal = ssm.createCodebasePrincipal(uri, {});
       request = indexedDB.openForPrincipal(principal, params.dbName,
                                            params.dbOptions);
     } else {
       request = indexedDB.open(params.dbName, params.dbOptions);
     }
     return request;
   }
--- a/dom/indexedDB/test/unit/test_oldDirectories.js
+++ b/dom/indexedDB/test/unit/test_oldDirectories.js
@@ -14,17 +14,17 @@ function testSteps()
 
   let ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                          .getService(SpecialPowers.Ci.nsIIOService);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   function openDatabase() {
-    let uri = ios.newURI(url, null, null);
+    let uri = ios.newURI(url);
     let principal = ssm.createCodebasePrincipal(uri, {});
     let request = indexedDB.openForPrincipal(principal, dbName, dbVersion);
     return request;
   }
 
   clearAllDatabases(continueToNextStepSync);
   yield undefined;
 
--- a/dom/indexedDB/test/unit/test_open_for_principal.js
+++ b/dom/indexedDB/test/unit/test_open_for_principal.js
@@ -42,17 +42,17 @@ function testSteps()
   request = objectStore.add(data.value, data.key);
   request.onsuccess = grabEventAndContinueHandler;
   event = yield undefined;
 
   is(event.target.result, data.key, "Got correct key");
 
   let uri = Components.classes["@mozilla.org/network/io-service;1"]
                       .getService(Components.interfaces.nsIIOService)
-                      .newURI("http://appdata.example.com", null, null);
+                      .newURI("http://appdata.example.com");
   let ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
                       .getService(Components.interfaces.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(uri, {});
 
   request = indexedDB.openForPrincipal(principal, name, 1);
   request.onerror = errorHandler;
   request.onupgradeneeded = grabEventAndContinueHandler;
   request.onsuccess = grabEventAndContinueHandler;
--- a/dom/indexedDB/test/unit/test_schema23upgrade.js
+++ b/dom/indexedDB/test/unit/test_schema23upgrade.js
@@ -18,17 +18,17 @@ function testSteps()
 
   let ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                          .getService(SpecialPowers.Ci.nsIIOService);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   function openDatabase(params) {
-    let uri = ios.newURI(params.url, null, null);
+    let uri = ios.newURI(params.url);
     let principal =
       ssm.createCodebasePrincipal(uri,
                                   {appId: params.appId || ssm.NO_APPID,
                                    inIsolatedMozBrowser: params.inIsolatedMozBrowser});
     let request = indexedDB.openForPrincipal(principal, params.dbName,
                                              params.dbVersion);
     return request;
   }
--- a/dom/indexedDB/test/unit/test_storagePersistentUpgrade.js
+++ b/dom/indexedDB/test/unit/test_storagePersistentUpgrade.js
@@ -18,17 +18,17 @@ function testSteps()
 
   let ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                          .getService(SpecialPowers.Ci.nsIIOService);
 
   let ssm = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                          .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
 
   function openDatabase(params) {
-    let uri = ios.newURI(params.url, null, null);
+    let uri = ios.newURI(params.url);
     let principal =
       ssm.createCodebasePrincipal(uri,
                                   {appId: params.appId || ssm.NO_APPID,
                                    inIsolatedMozBrowser: params.inIsolatedMozBrowser});
     let request = indexedDB.openForPrincipal(principal, params.dbName,
                                              params.dbVersion);
     return request;
   }
--- a/dom/indexedDB/test/unit/xpcshell-head-parent-process.js
+++ b/dom/indexedDB/test/unit/xpcshell-head-parent-process.js
@@ -559,17 +559,17 @@ function setMaxSerializedMsgSize(aSize)
   info("Setting maximal size of a serialized message to " + aSize);
   SpecialPowers.setIntPref("dom.indexedDB.maxSerializedMsgSize", aSize);
 }
 
 function getPrincipal(url)
 {
   let uri = Cc["@mozilla.org/network/io-service;1"]
               .getService(Ci.nsIIOService)
-              .newURI(url, null, null);
+              .newURI(url);
   let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   return ssm.createCodebasePrincipal(uri, {});
 }
 
 var SpecialPowers = {
   isMainProcess: function() {
     return Components.classes["@mozilla.org/xre/app-info;1"]
--- a/dom/ipc/tests/browser_domainPolicy.js
+++ b/dom/ipc/tests/browser_domainPolicy.js
@@ -111,24 +111,24 @@ function* test_domainPolicy() {
 
   info("Testing simple blacklist policy");
 
   info("Creating child process first, activating domainPolicy after");
   currentTask = initProcess();
   yield currentTask;
   activateDomainPolicy();
   var bl = policy.blacklist;
-  bl.add(Services.io.newURI('http://example.com', null, null));
+  bl.add(Services.io.newURI('http://example.com'));
   currentTask = runTest(testDomain("http://example.com"));
   checkAndCleanup(yield currentTask);
 
   info("Activating domainPolicy first, creating child process after");
   activateDomainPolicy();
   var bl = policy.blacklist;
-  bl.add(Services.io.newURI('http://example.com', null, null));
+  bl.add(Services.io.newURI('http://example.com'));
   currentTask = initProcess();
   yield currentTask;
   currentTask = runTest(testDomain("http://example.com"));
   checkAndCleanup(yield currentTask);
 
   function testList(expectEnabled, list) {
     ipcArgs.expectEnabled = expectEnabled;
     ipcArgs.list = list;
--- a/dom/media/IdpSandbox.jsm
+++ b/dom/media/IdpSandbox.jsm
@@ -153,17 +153,17 @@ IdpSandbox.createIdpUri = function(domai
   IdpSandbox.checkDomain(domain);
   IdpSandbox.checkProtocol(protocol);
 
   let message = 'Invalid IdP parameters: ';
   try {
     let wkIdp = 'https://' + domain + '/.well-known/idp-proxy/' + protocol;
     let ioService = Components.classes['@mozilla.org/network/io-service;1']
                     .getService(Ci.nsIIOService);
-    let uri = ioService.newURI(wkIdp, null, null);
+    let uri = ioService.newURI(wkIdp);
 
     if (uri.hostPort !== domain) {
       throw new Error(message + 'domain is invalid');
     }
     if (uri.path.indexOf('/.well-known/idp-proxy/') !== 0) {
       throw new Error(message + 'must produce a /.well-known/idp-proxy/ URI');
     }
 
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -601,17 +601,17 @@ RTCPeerConnection.prototype = {
         this.logWarning("RTCIceServer.url is deprecated! Use urls instead.");
       }
     });
 
     let ios = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService);
 
     let nicerNewURI = uriStr => {
       try {
-        return ios.newURI(uriStr, null, null);
+        return ios.newURI(uriStr);
       } catch (e if (e.result == Cr.NS_ERROR_MALFORMED_URI)) {
         throw new this._win.DOMException(msg + " - malformed URI: " + uriStr,
                                          "SyntaxError");
       }
     };
 
     var stunServers = 0;
 
--- a/dom/notification/test/browser/browser_permission_dismiss.js
+++ b/dom/notification/test/browser/browser_permission_dismiss.js
@@ -1,11 +1,11 @@
 "use strict";
 
-const ORIGIN_URI = Services.io.newURI("http://mochi.test:8888", null, null);
+const ORIGIN_URI = Services.io.newURI("http://mochi.test:8888");
 const PERMISSION_NAME = "desktop-notification";
 const PROMPT_ALLOW_BUTTON = -1;
 const PROMPT_BLOCK_BUTTON = 0;
 const TEST_URL = "http://mochi.test:8888/browser/dom/notification/test/browser/notification.html";
 
 /**
  * Clicks the specified web-notifications prompt button.
  *
--- a/dom/presentation/provider/AndroidCastDeviceProvider.js
+++ b/dom/presentation/provider/AndroidCastDeviceProvider.js
@@ -326,17 +326,17 @@ ChromecastRemoteDisplayDevice.prototype 
       type: TOPIC_ANDROID_CAST_DEVICE_STOP,
       id:   this.id
     });
   },
 
   isRequestedUrlSupported: function CRDD_isRequestedUrlSupported(aUrl) {
     let url = Cc["@mozilla.org/network/io-service;1"]
                 .getService(Ci.nsIIOService)
-                .newURI(aUrl, null, null);
+                .newURI(aUrl);
     return url.scheme == "http" || url.scheme == "https";
   },
 
   // nsIPresentationLocalDevice
   get windowId() { return this._id; },
 
   // nsIObserver
   observe: function CRDD_observe(aSubject, aTopic, aData) {
--- a/dom/push/PushRecord.jsm
+++ b/dom/push/PushRecord.jsm
@@ -291,17 +291,17 @@ var principals = new WeakMap();
 Object.defineProperties(PushRecord.prototype, {
   principal: {
     get() {
       if (this.systemRecord) {
         return Services.scriptSecurityManager.getSystemPrincipal();
       }
       let principal = principals.get(this);
       if (!principal) {
-        let uri = Services.io.newURI(this.scope, null, null);
+        let uri = Services.io.newURI(this.scope);
         // Allow tests to omit origin attributes.
         let originSuffix = this.originAttributes || "";
         let originAttributes =
         principal = Services.scriptSecurityManager.createCodebasePrincipal(uri,
           ChromeUtils.createOriginAttributesFromOrigin(originSuffix));
         principals.set(this, principal);
       }
       return principal;
--- a/dom/push/PushService.jsm
+++ b/dom/push/PushService.jsm
@@ -390,17 +390,17 @@ this.PushService = {
     let service;
 
     if (!serverURL) {
       console.warn("findService: No dom.push.serverURL found");
       return [];
     }
 
     try {
-      uri = Services.io.newURI(serverURL, null, null);
+      uri = Services.io.newURI(serverURL);
     } catch (e) {
       console.warn("findService: Error creating valid URI from",
         "dom.push.serverURL", serverURL);
       return [];
     }
 
     for (let connProtocol of CONNECTION_PROTOCOLS) {
       if (connProtocol.validServerURI(uri)) {
--- a/dom/push/PushServiceHttp2.jsm
+++ b/dom/push/PushServiceHttp2.jsm
@@ -307,17 +307,17 @@ SubscriptionListener.prototype = {
       return;
     }
 
     if (!subscriptionUri) {
       this._reject(new Error("Invalid Location header"));
       return;
     }
     try {
-      let uriTry = Services.io.newURI(subscriptionUri, null, null);
+      let uriTry = Services.io.newURI(subscriptionUri);
     } catch (e) {
       console.error("onStopRequest: Invalid subscription URI",
         subscriptionUri);
       this._reject(new Error("Invalid subscription endpoint: " +
         subscriptionUri));
       return;
     }
 
--- a/dom/push/PushServiceWebSocket.jsm
+++ b/dom/push/PushServiceWebSocket.jsm
@@ -617,17 +617,17 @@ this.PushServiceWebSocket = {
 
     let tmp = this._takeRequestForReply(reply);
     if (!tmp) {
       return;
     }
 
     if (reply.status == 200) {
       try {
-        Services.io.newURI(reply.pushEndpoint, null, null);
+        Services.io.newURI(reply.pushEndpoint);
       }
       catch (e) {
         tmp.reject(new Error("Invalid push endpoint: " + reply.pushEndpoint));
         return;
       }
 
       let record = new PushRecordWebSocket({
         channelID: reply.channelID,
--- a/dom/push/test/xpcshell/test_drop_expired.js
+++ b/dom/push/test/xpcshell/test_drop_expired.js
@@ -16,17 +16,17 @@ function visitURI(uri, timestamp) {
     uri: uri,
     title: uri.spec,
     visitDate: timestamp * 1000,
     transition: Ci.nsINavHistoryService.TRANSITION_LINK
   });
 }
 
 var putRecord = Task.async(function* ({scope, perm, quota, lastPush, lastVisit}) {
-  let uri = Services.io.newURI(scope, null, null);
+  let uri = Services.io.newURI(scope);
 
   Services.perms.add(uri, 'desktop-notification',
     Ci.nsIPermissionManager[perm]);
   do_register_cleanup(() => {
     Services.perms.remove(uri, 'desktop-notification');
   });
 
   yield visitURI(uri, lastVisit);
--- a/dom/push/test/xpcshell/test_permissions.js
+++ b/dom/push/test/xpcshell/test_permissions.js
@@ -29,17 +29,17 @@ function promiseUnregister(keyID) {
 
 function makePushPermission(url, capability) {
   return {
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIPermission]),
     capability: Ci.nsIPermissionManager[capability],
     expireTime: 0,
     expireType: Ci.nsIPermissionManager.EXPIRE_NEVER,
     principal: Services.scriptSecurityManager.getCodebasePrincipal(
-      Services.io.newURI(url, null, null)
+      Services.io.newURI(url)
     ),
     type: 'desktop-notification',
   };
 }
 
 function promiseObserverNotifications(topic, count) {
   let notifiedScopes = [];
   let subChangePromise = promiseObserverNotification(topic, (subject, data) => {
--- a/dom/push/test/xpcshell/test_quota_observer.js
+++ b/dom/push/test/xpcshell/test_quota_observer.js
@@ -13,17 +13,17 @@ function run_test() {
   do_get_profile();
   setPrefs({
     userAgentID,
   });
   run_next_test();
 }
 
 let putRecord = Task.async(function* (perm, record) {
-  let uri = Services.io.newURI(record.scope, null, null);
+  let uri = Services.io.newURI(record.scope);
 
   Services.perms.add(uri, 'desktop-notification',
     Ci.nsIPermissionManager[perm]);
   do_register_cleanup(() => {
     Services.perms.remove(uri, 'desktop-notification');
   });
 
   yield db.put(record);
--- a/dom/push/test/xpcshell/test_record.js
+++ b/dom/push/test/xpcshell/test_record.js
@@ -59,17 +59,17 @@ function testPermissionCheck(props) {
   if (props.originAttributes) {
     let originSuffix = ChromeUtils.originAttributesToSuffix(
       record.principal.originAttributes);
     equal(originSuffix, props.originAttributes,
       `Origin suffixes should match for ${JSON.stringify(props)}`);
   }
   ok(!record.hasPermission(), `Record ${
     JSON.stringify(props)} should not have permission yet`);
-  let permURI = Services.io.newURI(props.scope, null, null);
+  let permURI = Services.io.newURI(props.scope);
   Services.perms.add(permURI, 'desktop-notification',
                      Ci.nsIPermissionManager.ALLOW_ACTION);
   try {
     ok(record.hasPermission(), `Record ${
       JSON.stringify(props)} should have permission`);
   } finally {
     Services.perms.remove(permURI, 'desktop-notification');
   }
--- a/dom/push/test/xpcshell/test_service_child.js
+++ b/dom/push/test/xpcshell/test_service_child.js
@@ -226,17 +226,17 @@ add_test(function test_unsubscribe_error
       do_test_finished();
       run_next_test();
     }
   );
 });
 
 add_test(function test_subscribe_app_principal() {
   let principal = Services.scriptSecurityManager.getAppCodebasePrincipal(
-    Services.io.newURI('https://example.net/app/1', null, null),
+    Services.io.newURI('https://example.net/app/1'),
     1, /* appId */
     true /* browserOnly */
   );
 
   do_test_pending();
   PushServiceComponent.subscribe('https://example.net/scope/1', principal, (result, subscription) => {
     ok(Components.isSuccessCode(result), 'Error creating subscription');
     ok(subscription.endpoint.startsWith('https://example.org/push'),
--- a/dom/settings/SettingsDB.jsm
+++ b/dom/settings/SettingsDB.jsm
@@ -173,17 +173,17 @@ SettingsDB.prototype = {
       }
       return taBytes;
     }
 
     // Check if we have a data: uri, and if it's base64 encoded.
     // data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA...
     if (typeof aValue == "string" && aValue.startsWith("data:")) {
       try {
-        let uri = Services.io.newURI(aValue, null, null);
+        let uri = Services.io.newURI(aValue);
         // XXX: that would be nice to reuse the c++ bits of the data:
         // protocol handler instead.
         let mimeType = "application/octet-stream";
         let mimeDelim = aValue.indexOf(";");
         if (mimeDelim !== -1) {
           mimeType = aValue.substring(5, mimeDelim);
         }
         let start = aValue.indexOf(",") + 1;
--- a/dom/tests/browser/browser_ConsoleAPI_originAttributes.js
+++ b/dom/tests/browser/browser_ConsoleAPI_originAttributes.js
@@ -46,17 +46,17 @@ function test()
 {
   ConsoleObserver.init();
 
   waitForExplicitFinish();
 
   let uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
   let uuid = uuidGenerator.generateUUID().number;
   uuid = uuid.slice(1, -1); // Strip { and } off the UUID.
-  let baseURI = Services.io.newURI("about:blank", null, null);
+  let baseURI = Services.io.newURI("about:blank");
   let originAttributes = {addonId: FAKE_ADDON_ID};
   let principal = Services.scriptSecurityManager
         .createCodebasePrincipal(baseURI, originAttributes);
 
   let chromeWebNav = Services.appShell.createWindowlessBrowser(true);
   let interfaceRequestor = chromeWebNav.QueryInterface(Ci.nsIInterfaceRequestor);
   let docShell = interfaceRequestor.getInterface(Ci.nsIDocShell);
   docShell.createAboutBlankContentViewer(principal);
--- a/dom/tests/mochitest/ajax/offline/offlineTests.js
+++ b/dom/tests/mochitest/ajax/offline/offlineTests.js
@@ -296,17 +296,17 @@ manifestURL: function(overload)
     }
     if (win)
       manifestURLspec = win.document.documentElement.getAttribute("manifest");
   }
 
   var ios = Cc["@mozilla.org/network/io-service;1"]
             .getService(Ci.nsIIOService)
 
-  var baseURI = ios.newURI(window.location.href, null, null);
+  var baseURI = ios.newURI(window.location.href);
   return ios.newURI(manifestURLspec, null, baseURI);
 },
 
 loadContext: function()
 {
   return SpecialPowers.wrap(window).QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
                                    .getInterface(SpecialPowers.Ci.nsIWebNavigation)
                                    .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
--- a/dom/tests/unit/test_bug465752.js
+++ b/dom/tests/unit/test_bug465752.js
@@ -3,20 +3,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 function run_test()
 {
   const ios = Components.classes["@mozilla.org/network/io-service;1"]
                         .getService(Components.interfaces.nsIIOService);
   const str = "javascript:10";
-  var uri = ios.newURI(str, null, null);
-  var uri2 = ios.newURI(str, null, null);
+  var uri = ios.newURI(str);
+  var uri2 = ios.newURI(str);
   const str2 = "http://example.org";
-  var uri3 = ios.newURI(str2, null, null);
+  var uri3 = ios.newURI(str2);
   do_check_true(uri.equals(uri));
   do_check_true(uri.equals(uri2));
   do_check_true(uri2.equals(uri));
   do_check_true(uri2.equals(uri2));
   do_check_false(uri3.equals(uri2));
   do_check_false(uri2.equals(uri3));
 
   var simple = Components.classes["@mozilla.org/network/simple-uri;1"]
--- a/extensions/cookie/test/unit/test_permmanager_matches.js
+++ b/extensions/cookie/test/unit/test_permmanager_matches.js
@@ -26,22 +26,22 @@ function run_test() {
   // initialize the permission manager service
   let pm = Cc["@mozilla.org/permissionmanager;1"].
         getService(Ci.nsIPermissionManager);
 
   let secMan = Cc["@mozilla.org/scriptsecuritymanager;1"]
         .getService(Ci.nsIScriptSecurityManager);
 
   // Add some permissions
-  let uri0 = NetUtil.newURI("http://google.com/search?q=foo#hashtag", null, null);
-  let uri1 = NetUtil.newURI("http://hangouts.google.com/subdir", null, null);
-  let uri2 = NetUtil.newURI("http://google.org/", null, null);
-  let uri3 = NetUtil.newURI("https://google.com/some/random/subdirectory", null, null);
-  let uri4 = NetUtil.newURI("https://hangouts.google.com/#!/hangout", null, null);
-  let uri5 = NetUtil.newURI("http://google.com:8096/", null, null);
+  let uri0 = NetUtil.newURI("http://google.com/search?q=foo#hashtag");
+  let uri1 = NetUtil.newURI("http://hangouts.google.com/subdir");
+  let uri2 = NetUtil.newURI("http://google.org/");
+  let uri3 = NetUtil.newURI("https://google.com/some/random/subdirectory");
+  let uri4 = NetUtil.newURI("https://hangouts.google.com/#!/hangout");
+  let uri5 = NetUtil.newURI("http://google.com:8096/");
 
   let uri0_n_n = secMan.createCodebasePrincipal(uri0, {});
   let uri1_n_n = secMan.createCodebasePrincipal(uri1, {});
   let uri2_n_n = secMan.createCodebasePrincipal(uri2, {});
   let uri3_n_n = secMan.createCodebasePrincipal(uri3, {});
   let uri4_n_n = secMan.createCodebasePrincipal(uri4, {});
   let uri5_n_n = secMan.createCodebasePrincipal(uri5, {});
 
--- a/extensions/cookie/test/unit/test_permmanager_matchesuri.js
+++ b/extensions/cookie/test/unit/test_permmanager_matchesuri.js
@@ -50,28 +50,28 @@ function run_test() {
 
   let fileprefix = "file:///";
   if (Services.appinfo.OS == "WINNT") {
     // Windows rejects files if they don't have a drive. See Bug 1180870
     fileprefix += "c:/";
   }
 
   // Add some permissions
-  let uri0 = NetUtil.newURI("http://google.com:9091/just/a/path", null, null);
-  let uri1 = NetUtil.newURI("http://hangouts.google.com:9091/some/path", null, null);
-  let uri2 = NetUtil.newURI("http://google.com:9091/", null, null);
-  let uri3 = NetUtil.newURI("http://google.org:9091/", null, null);
-  let uri4 = NetUtil.newURI("http://deeper.hangouts.google.com:9091/", null, null);
-  let uri5 = NetUtil.newURI("https://google.com/just/a/path", null, null);
-  let uri6 = NetUtil.newURI("https://hangouts.google.com", null, null);
-  let uri7 = NetUtil.newURI("https://google.com/", null, null);
+  let uri0 = NetUtil.newURI("http://google.com:9091/just/a/path");
+  let uri1 = NetUtil.newURI("http://hangouts.google.com:9091/some/path");
+  let uri2 = NetUtil.newURI("http://google.com:9091/");
+  let uri3 = NetUtil.newURI("http://google.org:9091/");
+  let uri4 = NetUtil.newURI("http://deeper.hangouts.google.com:9091/");
+  let uri5 = NetUtil.newURI("https://google.com/just/a/path");
+  let uri6 = NetUtil.newURI("https://hangouts.google.com");
+  let uri7 = NetUtil.newURI("https://google.com/");
 
-  let fileuri1 = NetUtil.newURI(fileprefix + "a/file/path", null, null);
-  let fileuri2 = NetUtil.newURI(fileprefix + "a/file/path/deeper", null, null);
-  let fileuri3 = NetUtil.newURI(fileprefix + "a/file/otherpath", null, null);
+  let fileuri1 = NetUtil.newURI(fileprefix + "a/file/path");
+  let fileuri2 = NetUtil.newURI(fileprefix + "a/file/path/deeper");
+  let fileuri3 = NetUtil.newURI(fileprefix + "a/file/otherpath");
 
   {
     let perm = mk_permission(uri0);
     matches_always(perm, [uri0, uri2]);
     matches_weak(perm, [uri1, uri4]);
     matches_never(perm, [uri3, uri5, uri6, uri7, fileuri1, fileuri2, fileuri3]);
   }
 
--- a/extensions/cookie/test/unit/test_permmanager_migrate_4-7.js
+++ b/extensions/cookie/test/unit/test_permmanager_migrate_4-7.js
@@ -150,18 +150,18 @@ add_task(function test() {
     ["https://127.0.0.1", "A", 1, 0, 0],
     ["http://192.0.2.235", "A", 1, 0, 0],
     ["https://192.0.2.235", "A", 1, 0, 0],
   ];
 
   let found = expected.map((it) => 0);
 
   // Add some places to the places database
-  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory", null, null));
-  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory", null, null));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory"));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory"));
 
   // Force initialization of the nsPermissionManager
   let enumerator = Services.perms.enumerator;
   while (enumerator.hasMoreElements()) {
     let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);
     let isExpected = false;
 
     expected.forEach((it, i) => {
--- a/extensions/cookie/test/unit/test_permmanager_migrate_5-7a.js
+++ b/extensions/cookie/test/unit/test_permmanager_migrate_5-7a.js
@@ -204,18 +204,18 @@ add_task(function test() {
     ["https://127.0.0.1", "A", 1, 0, 0],
     ["http://192.0.2.235", "A", 1, 0, 0],
     ["https://192.0.2.235", "A", 1, 0, 0],
   ];
 
   let found = expected.map((it) => 0);
 
   // Add some places to the places database
-  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory", null, null));
-  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory", null, null));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory"));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory"));
 
   // Force initialization of the nsPermissionManager
   let enumerator = Services.perms.enumerator;
   while (enumerator.hasMoreElements()) {
     let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);
     let isExpected = false;
 
     expected.forEach((it, i) => {
--- a/extensions/cookie/test/unit/test_permmanager_migrate_6-7a.js
+++ b/extensions/cookie/test/unit/test_permmanager_migrate_6-7a.js
@@ -204,18 +204,18 @@ add_task(function test() {
     ["https://127.0.0.1", "A", 1, 0, 0],
     ["http://192.0.2.235", "A", 1, 0, 0],
     ["https://192.0.2.235", "A", 1, 0, 0],
   ];
 
   let found = expected.map((it) => 0);
 
   // Add some places to the places database
-  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory", null, null));
-  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory", null, null));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory"));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory"));
 
   // Force initialization of the nsPermissionManager
   let enumerator = Services.perms.enumerator;
   while (enumerator.hasMoreElements()) {
     let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);
     let isExpected = false;
 
     expected.forEach((it, i) => {
--- a/extensions/cookie/test/unit/test_permmanager_migrate_7-8.js
+++ b/extensions/cookie/test/unit/test_permmanager_migrate_7-8.js
@@ -182,20 +182,20 @@ add_task(function test() {
 
     // There should only be one entry of this type in the database
     ["https://192.0.2.235", "A", 2, 0, 0],
   ];
 
   let found = expected.map((it) => 0);
 
   // Add some places to the places database
-  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory", null, null));
-  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory", null, null));
-  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://127.0.0.1:8080", null, null));
-  yield PlacesTestUtils.addVisits(Services.io.newURI("https://localhost:8080", null, null));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("https://foo.com/some/other/subdirectory"));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://some.subdomain.of.foo.com:8000/some/subdirectory"));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("ftp://127.0.0.1:8080"));
+  yield PlacesTestUtils.addVisits(Services.io.newURI("https://localhost:8080"));
 
   // Force initialization of the nsPermissionManager
   let enumerator = Services.perms.enumerator;
   while (enumerator.hasMoreElements()) {
     let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);
     let isExpected = false;
 
     expected.forEach((it, i) => {
--- a/extensions/cookie/test/unit/test_permmanager_removeforapp.js
+++ b/extensions/cookie/test/unit/test_permmanager_removeforapp.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function run_test() {
   // initialize the permission manager service
   let ssm = Services.scriptSecurityManager;
   let pm = Services.perms;
 
   function mkPrin(uri, appId, inIsolatedMozBrowser) {
-    return ssm.createCodebasePrincipal(Services.io.newURI(uri, null, null),
+    return ssm.createCodebasePrincipal(Services.io.newURI(uri),
                                        {appId: appId, inIsolatedMozBrowser: inIsolatedMozBrowser});
   }
 
   function checkPerms(perms) {
     perms.forEach((perm) => {
       // Look up the expected permission
       do_check_eq(pm.getPermissionObject(mkPrin(perm[0],  perm[1], perm[2]),
                                          perm[3], true).capability,
--- a/extensions/cookie/test/unit/test_permmanager_removepermission.js
+++ b/extensions/cookie/test/unit/test_permmanager_removepermission.js
@@ -4,18 +4,18 @@
 function run_test() {
   // initialize the permission manager service
   let pm = Cc["@mozilla.org/permissionmanager;1"].
         getService(Ci.nsIPermissionManager);
 
   do_check_eq(perm_count(), 0);
 
   // add some permissions
-  let uri = NetUtil.newURI("http://amazon.com:8080/foobarbaz", null, null);
-  let uri2 = NetUtil.newURI("http://google.com:2048/quxx", null, null);
+  let uri = NetUtil.newURI("http://amazon.com:8080/foobarbaz");
+  let uri2 = NetUtil.newURI("http://google.com:2048/quxx");
 
   pm.add(uri, "apple", 0);
   pm.add(uri, "apple", 3);
   pm.add(uri, "pear", 3);
   pm.add(uri, "pear", 1);
   pm.add(uri, "cucumber", 1);
   pm.add(uri, "cucumber", 1);
   pm.add(uri, "cucumber", 1);
--- a/extensions/cookie/test/unit_ipc/test_child.js
+++ b/extensions/cookie/test/unit_ipc/test_child.js
@@ -6,17 +6,17 @@ var gIoService = Components.classes["@mo
                            .getService(Components.interfaces.nsIIOService);
 
 function isParentProcess() {
     let appInfo = Cc["@mozilla.org/xre/app-info;1"];
     return (!appInfo || appInfo.getService(Ci.nsIXULRuntime).processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT);
 }
 
 function getPrincipalForURI(aURI) {
-  var uri =  gIoService.newURI(aURI, null, null);
+  var uri =  gIoService.newURI(aURI);
   var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   return ssm.createCodebasePrincipal(uri, {});
 }
 
 function run_test() {
   if (!isParentProcess()) {
     const Ci = Components.interfaces;
--- a/extensions/cookie/test/unit_ipc/test_parent.js
+++ b/extensions/cookie/test/unit_ipc/test_parent.js
@@ -6,17 +6,17 @@ var gIoService = Components.classes["@mo
                            .getService(Components.interfaces.nsIIOService);
 
 function isParentProcess() {
     let appInfo = Cc["@mozilla.org/xre/app-info;1"];
     return (!appInfo || appInfo.getService(Ci.nsIXULRuntime).processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT);
 }
 
 function getPrincipalForURI(aURI) {
-  var uri = gIoService.newURI(aURI, null, null);
+  var uri = gIoService.newURI(aURI);
   var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   return ssm.createCodebasePrincipal(uri, {});
 }
 
 function run_test() {
   if (isParentProcess()) {
     var pm = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
--- a/extensions/pref/autoconfig/src/prefcalls.js
+++ b/extensions/pref/autoconfig/src/prefcalls.js
@@ -155,17 +155,17 @@ function setLDAPVersion(version) {
 function getLDAPAttributes(host, base, filter, attribs, isSecure) {
     
     try {
         var urlSpec = "ldap" + (isSecure ? "s" : "") + "://" + host + (isSecure ? ":636" : "") + "/" + base + "?" + attribs + "?sub?" +
                       filter;
 
         var url = Components.classes["@mozilla.org/network/io-service;1"]
                             .getService(Components.interfaces.nsIIOService)
-                            .newURI(urlSpec, null, null)
+                            .newURI(urlSpec)
                             .QueryInterface(Components.interfaces.nsILDAPURL);
 
         var ldapquery = Components.classes[LDAPSyncQueryContractID]
                                   .createInstance(nsILDAPSyncQuery);
         // default to LDAP v3
         if (!gVersion)
           gVersion = Components.interfaces.nsILDAPConnection.VERSION3
  	// user supplied method
--- a/image/test/unit/test_async_notification.js
+++ b/image/test/unit/test_async_notification.js
@@ -1,10 +1,10 @@
 /*
  * Test for asynchronous image load/decode notifications in the case that the image load works.
  */
 
 // A simple 3x3 png; rows go red, green, blue. Stolen from the PNG encoder test.
 var pngspec = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII=";
 var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
-var uri = ioService.newURI(pngspec, null, null);
+var uri = ioService.newURI(pngspec);
 
 load('async_load_tests.js');
--- a/image/test/unit/test_async_notification_404.js
+++ b/image/test/unit/test_async_notification_404.js
@@ -5,12 +5,12 @@
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                            .getService(Components.interfaces.nsIIOService);
 
 XPCOMUtils.defineLazyGetter(this, "uri", function() {
     return ioService.newURI("http://localhost:" +
                             server.identity.primaryPort +
-                            "/async-notification-never-here.jpg", null, null);
+                            "/async-notification-never-here.jpg");
 });
 
 load('async_load_tests.js');
--- a/image/test/unit/test_async_notification_animated.js
+++ b/image/test/unit/test_async_notification_animated.js
@@ -4,11 +4,11 @@
  *
  * If this fails because a request wasn't cancelled, it's possible that
  * imgContainer::ExtractFrame didn't set the new image's status correctly.
  */
 
 // transparent-animation.gif from the gif reftests.
 var spec = "data:image/gif;base64,R0lGODlhZABkAIABAP8AAP///yH5BAkBAAEALAAAAABLAGQAAAK8jI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpchgPMJjUqnVOipis1ir9qul+sNV8HistVkTj/JajG7/UXDy+95tm4fy/NdPF/q93dWIqgVWAhwWKgoyPjnyAeZJ2lHOWcJh9mmqcaZ5mkGSreHOCXqRloadRrGGkeoapoa6+TaN0tra4gbq3vHq+q7BVwqrMeEnKy8zNzs/AwdLT1NXW19jZ1tUgAAIfkECQEAAQAsAAAAADQAZAAAArCMj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/7vAAiHxKLxiCRCkswmc+mMSqHSapJqzSof2u4Q67WCw1MuOTs+N9Pqq7kdZcON8vk2aF+/88g6358HaCc4Rwhn2IaopnjGSOYYBukl2UWpZYm2x0enuXnX4NnXGQqAKTYaalqlWoZH+snwWsQah+pJ64Sr5ypbCvQLHCw8TFxsfIycrLzM3PxQAAAh+QQJAQABACwAAAAAGwBkAAACUIyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gTE8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvdrfYnH5LL5jE6r16sCADs=";
 var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
-var uri = ioService.newURI(spec, null, null);
+var uri = ioService.newURI(spec);
 
 load('async_load_tests.js');
--- a/image/test/unit/test_moz_icon_uri.js
+++ b/image/test/unit/test_moz_icon_uri.js
@@ -22,73 +22,73 @@ function run_test() {
 
   // Note that if the scheme is not correct the ioservice won't even create an icon URI
   // so don't bother testing incorrect schemes here.
 
   // Make sure a valid file name icon URI can be created and that we can obtain
   // all arguments, the spec, and the file extension.
   currentSpec = "moz-icon://foo.html?contentType=bar&size=button&state=normal";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   iconURI = uri.QueryInterface(Ci.nsIMozIconURI);
   do_check_eq(iconURI.iconSize, "button");
   do_check_eq(iconURI.iconState, "normal");
   do_check_eq(iconURI.contentType, "bar");
   do_check_eq(iconURI.fileExtension, ".html");
 
   // Make sure a valid file name icon URI can be created with a numeric size,
   // and make sure the numeric size is handled properly
   currentSpec = "moz-icon://foo.html?size=3";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   iconURI = uri.QueryInterface(Ci.nsIMozIconURI);
   do_check_eq(iconURI.iconSize, "");
   do_check_eq(iconURI.imageSize, 3);
 
   // Make sure a valid stock icon URI can be created and that we can obtain
   // the stock icon's name.
   currentSpec = "moz-icon://stock/foo";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   iconURI = uri.QueryInterface(Ci.nsIMozIconURI);
   do_check_eq(iconURI.stockIcon, "foo");
 
   // Make sure an invalid stock icon URI, missing icon identifier, throws.
   currentSpec = "moz-icon://stock/?size=3";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_true(exception);
   exception = false; // reset exception value
 
   // Make sure a valid file URL icon URI can be created and that we can obtain
   // the URL and QI it to an nsIFileURL.
   currentSpec = "moz-icon:file://foo.txt";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   iconURI = uri.QueryInterface(Ci.nsIMozIconURI);
   let fileURL = null;
@@ -100,17 +100,17 @@ function run_test() {
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   do_check_neq(fileURL, null);
 
   // Now test a file URI which has been created with an extra //
   currentSpec = "moz-icon://file://foo.txt";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   iconURI = uri.QueryInterface(Ci.nsIMozIconURI);
   fileURL = null;
@@ -122,36 +122,36 @@ function run_test() {
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   do_check_neq(fileURL, null);
 
   // Now test a simple invalid icon URI. This should fail.
   currentSpec = "moz-icon:foo";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, true);
   exception = false; // reset exception value
 
   // Now test an icon URI that has a URI for a path but that is not a URL. This should fail.
   // This is png data for a little red dot that I got from wikipedia.
   currentSpec = "moz-icon:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg==";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, true);
   exception = false; // reset exception value
 
   // Now test a URI that should be a file name but is ridiculously long. This should fail.
   currentSpec = "moz-icon://data:application/vnd.ms-excel;base64,PHhtbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJ1dGYtOCI+PHNzOldvcmtib29rIHhtbG5zOnNzPSJ1cm46c2NoZW1hcy1taWNyb3NvZnQtY29tOm9mZmljZTpzcHJlYWRzaGVldCIgeG1sbnM6eD0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6ZXhjZWwiIHhtbG5zOm89InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSI+PG86RG9jdW1lbnRQcm9wZXJ0aWVzPjxvOlRpdGxlPkFycmF5IEdyaWQ8L286VGl0bGU+PC9vOkRvY3VtZW50UHJvcGVydGllcz48c3M6RXhjZWxXb3JrYm9vaz48c3M6V2luZG93SGVpZ2h0PjkwMDA8L3NzOldpbmRvd0hlaWdodD48c3M6V2luZG93V2lkdGg+MTc0ODA8L3NzOldpbmRvd1dpZHRoPjxzczpQcm90ZWN0U3RydWN0dXJlPkZhbHNlPC9zczpQcm90ZWN0U3RydWN0dXJlPjxzczpQcm90ZWN0V2luZG93cz5GYWxzZTwvc3M6UHJvdGVjdFdpbmRvd3M+PC9z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jx4OlByb3RlY3RPYmplY3RzPkZhbHNlPC94OlByb3RlY3RPYmplY3RzPjx4OlByb3RlY3RTY2VuYXJpb3M+RmFsc2U8L3g6UHJvdGVjdFNjZW5hcmlvcz48L3g6V29ya3NoZWV0T3B0aW9ucz48L3NzOldvcmtzaGVldD48L3NzOldvcmtib29rPg==";
   try {
-    uri = ioService.newURI(currentSpec, null, null);
+    uri = ioService.newURI(currentSpec);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, true);
   exception = false; // reset exception value
 };
--- a/image/test/unit/test_private_channel.js
+++ b/image/test/unit/test_private_channel.js
@@ -78,17 +78,17 @@ function setup_chan(path, isPrivate, cal
   channelListener.outputListener = outlistener.value;
   listener.synchronous = false;
 }
 
 function loadImage(isPrivate, callback) {
   var listener = new ImageListener(null, callback);
   var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools)
                 .createScriptedObserver(listener);
-  var uri = gIoService.newURI(gImgPath, null, null);
+  var uri = gIoService.newURI(gImgPath);
   var loadGroup = Cc["@mozilla.org/network/load-group;1"].createInstance(Ci.nsILoadGroup);
   loadGroup.notificationCallbacks = new NotificationCallbacks(isPrivate);
   var loader = isPrivate ? gPrivateLoader : gPublicLoader;
   requests.push(loader.loadImageXPCOM(uri, null, null, "default", null, loadGroup, outer, null, 0, null));
   listener.synchronous = false;
 }
 
 function run_loadImage_tests() {
--- a/js/xpconnect/tests/unit/test_import.js
+++ b/js/xpconnect/tests/unit/test_import.js
@@ -30,17 +30,17 @@ function run_test() {
   do_check_eq(typeof(scope2.XPCOMUtils), "object");
   do_check_eq(typeof(scope2.XPCOMUtils.generateNSGetFactory), "function");
   
   do_check_true(scope2.XPCOMUtils == scope.XPCOMUtils);
 
   // try on a new object using the resolved URL
   var res = Components.classes["@mozilla.org/network/protocol;1?name=resource"]
                       .getService(Components.interfaces.nsIResProtocolHandler);
-  var resURI = res.newURI("resource://gre/modules/XPCOMUtils.jsm", null, null);
+  var resURI = res.newURI("resource://gre/modules/XPCOMUtils.jsm");
   dump("resURI: " + resURI + "\n");
   var filePath = res.resolveURI(resURI);
   var scope3 = {};
   Components.utils.import(filePath, scope3);
   do_check_eq(typeof(scope3.XPCOMUtils), "object");
   do_check_eq(typeof(scope3.XPCOMUtils.generateNSGetFactory), "function");
   
   do_check_true(scope3.XPCOMUtils == scope.XPCOMUtils);
--- a/layout/tools/layout-debug/ui/content/layoutdebug.js
+++ b/layout/tools/layout-debug/ui/content/layoutdebug.js
@@ -360,17 +360,17 @@ RTestURLList.prototype = {
         var str = line.value;
         str = /^[^#]*/.exec(str); // strip everything after "#"
         str = /\S*/.exec(str); // take the first chunk of non-whitespace
         if (!str || str == "")
           continue;
       
         var item = dirURL.resolve(str);
         if (item.match(/\/rtest.lst$/)) {
-          var itemurl = ios.newURI(item, null, null);
+          var itemurl = ios.newURI(item);
           itemurl = itemurl.QueryInterface(nsIFileURL);
           this.readFileList(itemurl.file);
         } else {
           this.mURLs.push( {url:item, dir:aLocalFile.parent, relurl:str} );
         }
       } while (more);
     },
 
--- a/layout/tools/reftest/b2g_start_script.js
+++ b/layout/tools/reftest/b2g_start_script.js
@@ -10,17 +10,17 @@ function setPermissions() {
   }
 
   let serverAddr = __webDriverArguments[0];
   let serverPort = __webDriverArguments[1];
   let perms = Cc["@mozilla.org/permissionmanager;1"]
               .getService(Ci.nsIPermissionManager);
   let ioService = Cc["@mozilla.org/network/io-service;1"]
                   .getService(Ci.nsIIOService);
-  let uri = ioService.newURI("http://" + serverAddr + ":" + serverPort, null, null);
+  let uri = ioService.newURI("http://" + serverAddr + ":" + serverPort);
   perms.add(uri, "allowXULXBL", Ci.nsIPermissionManager.ALLOW_ACTION);
 }
 
 var cm = Cc["@mozilla.org/categorymanager;1"]
            .getService(Ci.nsICategoryManager);
 
 // Disable update timers that cause b2g failures.
 if (cm) {
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -810,17 +810,17 @@ function AddPrefSettings(aWhere, aPrefNa
     if (aWhere != "test-") {
         aRefPrefSettings.push(setting);
     }
     return true;
 }
 
 function ReadTopManifest(aFileURL, aFilter)
 {
-    var url = gIOService.newURI(aFileURL, null, null);
+    var url = gIOService.newURI(aFileURL);
     if (!url)
         throw "Expected a file or http URL for the manifest.";
     ReadManifest(url, EXPECTED_PASS, aFilter);
 }
 
 function AddTestItem(aTest, aFilter)
 {
     if (!aFilter)
@@ -1214,17 +1214,17 @@ function ServeFiles(manifestPrincipal, d
     gCount++;
     var path = "/" + Date.now() + "/" + gCount;
     gServer.registerDirectory(path + "/", directory);
 
     var secMan = CC[NS_SCRIPTSECURITYMANAGER_CONTRACTID]
                      .getService(CI.nsIScriptSecurityManager);
 
     var testbase = gIOService.newURI("http://localhost:" + gHttpServerPort +
-                                     path + dirPath, null, null);
+                                     path + dirPath);
 
     // Give the testbase URI access to XUL and XBL
     Services.perms.add(testbase, "allowXULXBL", Services.perms.ALLOW_ACTION);
 
     function FileToURI(file)
     {
         // Only serve relative URIs via the HTTP server, not absolute
         // ones like about:blank.
--- a/mobile/android/chrome/content/Feedback.js
+++ b/mobile/android/chrome/content/Feedback.js
@@ -53,12 +53,12 @@ var Feedback = {
     }
 
     let win = event.target.ownerDocument.defaultView.top;
     BrowserApp.closeTab(BrowserApp.getTabForWindow(win));
   },
 
   _isAllowed: function(node) {
     let uri = node.ownerDocument.documentURIObject;
-    let feedbackURI = Services.io.newURI(this._feedbackURL, null, null);
+    let feedbackURI = Services.io.newURI(this._feedbackURL);
     return uri.prePath === feedbackURI.prePath;
   }
 };
--- a/mobile/android/chrome/content/aboutHealthReport.js
+++ b/mobile/android/chrome/content/aboutHealthReport.js
@@ -54,17 +54,17 @@ var healthReportWrapper = {
   uninit: function () {
     sharedPrefs.removeObserver(PREF_UPLOAD_ENABLED, this);
     Services.obs.removeObserver(this, EVENT_HEALTH_RESPONSE);
   },
 
   _getReportURI: function () {
     let url = Services.urlFormatter.formatURLPref(PREF_REPORTURL);
     // This handles URLs that already have query parameters.
-    let uri = Services.io.newURI(url, null, null).QueryInterface(Ci.nsIURL);
+    let uri = Services.io.newURI(url).QueryInterface(Ci.nsIURL);
     uri.query += ((uri.query != "") ? "&v=" : "v=") + WRAPPER_VERSION;
     return uri;
   },
 
   onOptIn: function () {
     console.log("AboutHealthReport: page sent opt-in command.");
     sharedPrefs.setBoolPref(PREF_UPLOAD_ENABLED, true);
     this.updatePrefState();
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -295,20 +295,20 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "Point", "resource://gre/modules/Geometry.jsm");
 
 function resolveGeckoURI(aURI) {
   if (!aURI)
     throw "Can't resolve an empty uri";
 
   if (aURI.startsWith("chrome://")) {
     let registry = Cc['@mozilla.org/chrome/chrome-registry;1'].getService(Ci["nsIChromeRegistry"]);
-    return registry.convertChromeURL(Services.io.newURI(aURI, null, null)).spec;
+    return registry.convertChromeURL(Services.io.newURI(aURI)).spec;
   } else if (aURI.startsWith("resource://")) {
     let handler = Services.io.getProtocolHandler("resource").QueryInterface(Ci.nsIResProtocolHandler);
-    return handler.resolveURI(Services.io.newURI(aURI, null, null));
+    return handler.resolveURI(Services.io.newURI(aURI));
   }
   return aURI;
 }
 
 /**
  * Cache of commonly used string bundles.
  */
 var Strings = {
@@ -1312,17 +1312,17 @@ var BrowserApp = {
    * @param  aOptions Options for the search. Currently supports:
    **  @option startsWith a Boolean indicating whether to search for a tab who's url starts with the
    *           requested url. Useful if you want to ignore hash codes on the end of a url. For instance
    *           to have about:downloads match about:downloads#123.
    * @return the tab with the given URL, or null if no such tab exists
    */
   getTabWithURL: function getTabWithURL(aURL, aOptions) {
     aOptions = aOptions || {};
-    let uri = Services.io.newURI(aURL, null, null);
+    let uri = Services.io.newURI(aURL);
     for (let i = 0; i < this._tabs.length; ++i) {
       let tab = this._tabs[i];
       if (aOptions.startsWith) {
         if (tab.browser.currentURI.spec.startsWith(aURL)) {
           return tab;
         }
       } else {
         if (tab.browser.currentURI.equals(uri)) {
@@ -1638,17 +1638,17 @@ var BrowserApp = {
             flags |= Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE |
                      Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY;
           }
 
           if (data.contentType === "tracking") {
             // Convert document URI into the format used by
             // nsChannelClassifier::ShouldEnableTrackingProtection
             // (any scheme turned into https is correct)
-            let normalizedUrl = Services.io.newURI("https://" + browser.currentURI.hostPort, null, null);
+            let normalizedUrl = Services.io.newURI("https://" + browser.currentURI.hostPort);
             if (data.allowContent) {
               // Add the current host in the 'trackingprotection' consumer of
               // the permission manager using a normalized URI. This effectively
               // places this host on the tracking protection white list.
               if (PrivateBrowsingUtils.isBrowserPrivate(browser)) {
                 PrivateBrowsingUtils.addToTrackingAllowlist(normalizedUrl);
               } else {
                 Services.perms.add(normalizedUrl, "trackingprotection", Services.perms.ALLOW_ACTION);
@@ -2941,17 +2941,17 @@ var NativeWindow = {
     _getLink: function(aElement) {
       if (aElement.nodeType == Ci.nsIDOMNode.ELEMENT_NODE &&
           ((aElement instanceof Ci.nsIDOMHTMLAnchorElement && aElement.href) ||
           (aElement instanceof Ci.nsIDOMHTMLAreaElement && aElement.href) ||
           aElement instanceof Ci.nsIDOMHTMLLinkElement ||
           aElement.getAttributeNS(kXLinkNamespace, "type") == "simple")) {
         try {
           let url = this._getLinkURL(aElement);
-          return Services.io.newURI(url, null, null);
+          return Services.io.newURI(url);
         } catch (e) {}
       }
       return null;
     },
 
     _disableRestricted: function _disableRestricted(restriction, selector) {
       return {
         matches: function _disableRestrictedMatches(aElement, aX, aY) {
@@ -3266,17 +3266,17 @@ nsBrowserAccess.prototype = {
     }
 
     Services.io.offline = false;
 
     let referrer;
     if (aOpener) {
       try {
         let location = aOpener.location;
-        referrer = Services.io.newURI(location, null, null);
+        referrer = Services.io.newURI(location);
       } catch(e) { }
     }
 
     let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
     let pinned = false;
 
     if (aURI && aWhere == Ci.nsIBrowserDOMWindow.OPEN_SWITCHTAB) {
       pinned = true;
@@ -3452,17 +3452,17 @@ Tab.prototype = {
     }
 
     this.browser.stop();
 
     // Only set tab uri if uri is valid
     let uri = null;
     let title = aParams.title || aURL;
     try {
-      uri = Services.io.newURI(aURL, null, null).spec;
+      uri = Services.io.newURI(aURL).spec;
     } catch (e) {}
 
     // When the tab is stubbed from Java, there's a window between the stub
     // creation and the tab creation in Gecko where the stub could be removed
     // or the selected tab can change (which is easiest to hit during startup).
     // To prevent these races, we need to differentiate between tab stubs from
     // Java and new tabs from Gecko.
     let stub = false;
@@ -4259,17 +4259,17 @@ Tab.prototype = {
 
     // If we are navigating to a new location with a different host,
     // clear any URL origin that might have been pinned to this tab.
     let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
     let appOrigin = ss.getTabValue(this, "appOrigin");
     if (appOrigin) {
       let originHost = "";
       try {
-        originHost = Services.io.newURI(appOrigin, null, null).host;
+        originHost = Services.io.newURI(appOrigin).host;
       } catch (e if (e.result == Cr.NS_ERROR_FAILURE)) {
         // NS_ERROR_FAILURE can be thrown by nsIURI.host if the URI scheme does not possess a host - in this case
         // we just act as if we have an empty host.
       }
       if (originHost != aLocationURI.host) {
         // Note: going 'back' will not make this tab pinned again
         ss.deleteTabValue(this, "appOrigin");
       }
@@ -4569,17 +4569,17 @@ var BrowserEventHandler = {
     this._doTapHighlight(target);
   },
 
   _getLinkURI: function(aElement) {
     if (aElement.nodeType == Ci.nsIDOMNode.ELEMENT_NODE &&
         ((aElement instanceof Ci.nsIDOMHTMLAnchorElement && aElement.href) ||
         (aElement instanceof Ci.nsIDOMHTMLAreaElement && aElement.href))) {
       try {
-        return Services.io.newURI(aElement.href, null, null);
+        return Services.io.newURI(aElement.href);
       } catch (e) {}
     }
     return null;
   },
 
   observe: function(aSubject, aTopic, aData) {
     // the remaining events are all dependent on the browser content document being the
     // same as the browser displayed document. if they are not the same, we should ignore
@@ -4707,17 +4707,17 @@ var ErrorPageEventHandler = {
         // Exception…" or "Get me out of here!" button
         if (errorDoc.documentURI.startsWith("about:certerror?e=nssBadCert")) {
           let perm = errorDoc.getElementById("permanentExceptionButton");
           let temp = errorDoc.getElementById("temporaryExceptionButton");
           if (target == temp || target == perm) {
             // Handle setting an cert exception and reloading the page
             try {
               // Add a new SSL exception for this URL
-              let uri = Services.io.newURI(errorDoc.location.href, null, null);
+              let uri = Services.io.newURI(errorDoc.location.href);
               let sslExceptions = new SSLExceptions();
 
               if (target == perm)
                 sslExceptions.addPermanentException(uri, errorDoc.defaultView);
               else
                 sslExceptions.addTemporaryException(uri, errorDoc.defaultView);
             } catch (e) {
               dump("Failed to set cert exception: " + e + "\n");
@@ -6203,32 +6203,32 @@ var SearchEngines = {
    */
   visibleEngineExists: function(element) {
     let formData = this._getSortedFormData(element);
 
     let form = element.form;
     let method = form.method.toUpperCase();
 
     let charset = element.ownerDocument.characterSet;
-    let docURI = Services.io.newURI(element.ownerDocument.URL, charset, null);
+    let docURI = Services.io.newURI(element.ownerDocument.URL, charset);
     let formURL = Services.io.newURI(form.getAttribute("action"), charset, docURI).spec;
 
     return Services.search.hasEngineWithURL(method, formURL, formData);
   },
 
   /**
    * Adds a new search engine to the BrowserSearchService, based on its provided element. Prompts for an engine
    * name, and appends a simple version-number in case of collision with an existing name.
    *
    * @return callback to handle success value. Currently used for ActionBarHandler.js and UI updates.
    */
   addEngine: function addEngine(aElement, resultCallback) {
     let form = aElement.form;
     let charset = aElement.ownerDocument.characterSet;
-    let docURI = Services.io.newURI(aElement.ownerDocument.URL, charset, null);
+    let docURI = Services.io.newURI(aElement.ownerDocument.URL, charset);
     let formURL = Services.io.newURI(form.getAttribute("action"), charset, docURI).spec;
     let method = form.method.toUpperCase();
     let formData = this._getSortedFormData(aElement);
 
     // prompt user for name of search engine
     let promptTitle = Strings.browser.GetStringFromName("contextmenu.addSearchEngine3");
     let title = { value: (aElement.ownerDocument.title || docURI.host) };
     if (!Services.prompt.prompt(null, promptTitle, null, title, null, {})) {
@@ -6780,17 +6780,17 @@ var Tabs = {
         } else {
           // Use "heap-minimize" as a trigger to expire the most stale tab.
           this.expireLruTab();
         }
         break;
       case "Session:Prefetch":
         if (aData) {
           try {
-            let uri = Services.io.newURI(aData, null, null);
+            let uri = Services.io.newURI(aData);
             if (uri && !this._domains.has(uri.host)) {
               Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(uri, null);
               this._domains.add(uri.host);
             }
           } catch (e) {}
         }
         break;
       case "network:link-status-changed":
--- a/mobile/android/components/AboutRedirector.js
+++ b/mobile/android/components/AboutRedirector.js
@@ -106,17 +106,17 @@ AboutRedirector.prototype = {
   },
 
   newChannel: function(aURI, aLoadInfo) {
     let moduleInfo = this._getModuleInfo(aURI);
 
     var ios = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
 
-    var newURI = ios.newURI(moduleInfo.uri, null, null);
+    var newURI = ios.newURI(moduleInfo.uri);
 
     var channel = ios.newChannelFromURIWithLoadInfo(newURI, aLoadInfo);
 
     if (!moduleInfo.privileged) {
       // Setting the owner to null means that we'll go through the normal
       // path in GetChannelPrincipal and create a codebase principal based
       // on the channel's originalURI
       channel.owner = null;
--- a/mobile/android/components/BrowserCLH.js
+++ b/mobile/android/components/BrowserCLH.js
@@ -15,22 +15,22 @@ BrowserCLH.prototype = {
   /**
    * Register resource://android as the APK root.
    *
    * Consumers can access Android assets using resource://android/assets/FILENAME.
    */
   setResourceSubstitutions: function () {
     let registry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci["nsIChromeRegistry"]);
     // Like jar:jar:file:///data/app/org.mozilla.fennec-2.apk!/assets/omni.ja!/chrome/chrome/content/aboutHome.xhtml
-    let url = registry.convertChromeURL(Services.io.newURI("chrome://browser/content/aboutHome.xhtml", null, null)).spec;
+    let url = registry.convertChromeURL(Services.io.newURI("chrome://browser/content/aboutHome.xhtml")).spec;
     // Like jar:file:///data/app/org.mozilla.fennec-2.apk!/
     url = url.substring(4, url.indexOf("!/") + 2);
 
     let protocolHandler = Services.io.getProtocolHandler("resource").QueryInterface(Ci.nsIResProtocolHandler);
-    protocolHandler.setSubstitution("android", Services.io.newURI(url, null, null));
+    protocolHandler.setSubstitution("android", Services.io.newURI(url));
   },
 
   observe: function (subject, topic, data) {
     switch (topic) {
       case "app-startup":
         this.setResourceSubstitutions();
         break;
     }
--- a/mobile/android/components/PromptService.js
+++ b/mobile/android/components/PromptService.js
@@ -579,17 +579,17 @@ var PromptUtils = {
     return this.pwmgr = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
   },
 
   getHostnameAndRealm: function pu_getHostnameAndRealm(aRealmString) {
     let httpRealm = /^.+ \(.+\)$/;
     if (httpRealm.test(aRealmString))
       return [null, null, null];
 
-    let uri = Services.io.newURI(aRealmString, null, null);
+    let uri = Services.io.newURI(aRealmString);
     let pathname = "";
 
     if (uri.path != "/")
       pathname = uri.path;
 
     let formattedHostname = this._getFormattedHostname(uri);
     return [formattedHostname, formattedHostname + pathname, uri.username];
   },
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -1290,31 +1290,31 @@ SessionStore.prototype = {
     }
 
     return entry;
   },
 
   _deserializeHistoryEntry: function _deserializeHistoryEntry(aEntry, aIdMap, aDocIdentMap) {
     let shEntry = Cc["@mozilla.org/browser/session-history-entry;1"].createInstance(Ci.nsISHEntry);
 
-    shEntry.setURI(Services.io.newURI(aEntry.url, null, null));
+    shEntry.setURI(Services.io.newURI(aEntry.url));
     shEntry.setTitle(aEntry.title || aEntry.url);
     if (aEntry.subframe) {
       shEntry.setIsSubFrame(aEntry.subframe || false);
     }
     shEntry.loadType = Ci.nsIDocShellLoadInfo.loadHistory;
     if (aEntry.contentType) {
       shEntry.contentType = aEntry.contentType;
     }
     if (aEntry.referrer) {
-      shEntry.referrerURI = Services.io.newURI(aEntry.referrer, null, null);
+      shEntry.referrerURI = Services.io.newURI(aEntry.referrer);
     }
 
     if (aEntry.originalURI) {
-      shEntry.originalURI =  Services.io.newURI(aEntry.originalURI, null, null);
+      shEntry.originalURI =  Services.io.newURI(aEntry.originalURI);
     }
 
     if (aEntry.loadReplace) {
       shEntry.loadReplace = aEntry.loadReplace;
     }
 
     if (aEntry.cacheKey) {
       let cacheKey = Cc["@mozilla.org/supports-PRUint32;1"].createInstance(Ci.nsISupportsPRUint32);
--- a/mobile/android/extensions/flyweb/bootstrap.js
+++ b/mobile/android/extensions/flyweb/bootstrap.js
@@ -30,17 +30,17 @@ AboutFlyWeb.prototype = Object.freeze({
   classID: Components.ID("{baa04ff0-08b5-11e6-a837-0800200c9a66}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
 
   getURIFlags: function(aURI) {
     return Ci.nsIAboutModule.ALLOW_SCRIPT;
   },
 
   newChannel: function(aURI, aLoadInfo) {
-    let uri = Services.io.newURI("chrome://flyweb/content/aboutFlyWeb.xhtml", null, null);
+    let uri = Services.io.newURI("chrome://flyweb/content/aboutFlyWeb.xhtml");
     let channel = Services.io.newChannelFromURIWithLoadInfo(uri, aLoadInfo);
     channel.originalURI = aURI;
     return channel;
   }
 });
 
 function Factory(component) {
   this.createInstance = function(outer, iid) {
--- a/mobile/android/modules/FxAccountsWebChannel.jsm
+++ b/mobile/android/modules/FxAccountsWebChannel.jsm
@@ -144,17 +144,17 @@ this.FxAccountsWebChannel.prototype = {
   /**
    * Configures and registers a new WebChannel
    *
    * @private
    */
   _setupChannel() {
     // if this.contentUri is present but not a valid URI, then this will throw an error.
     try {
-      this._webChannelOrigin = Services.io.newURI(this._contentUri, null, null);
+      this._webChannelOrigin = Services.io.newURI(this._contentUri);
       this._registerChannel();
     } catch (e) {
       log.e(e.toString());
       throw e;
     }
   },
 
   /**
--- a/mobile/android/modules/HelperApps.jsm
+++ b/mobile/android/modules/HelperApps.jsm
@@ -59,17 +59,17 @@ var HelperApps =  {
       filterBrowsers: false,
       filterHtml: false
     });
   },
 
   _getHandlers: function(url, options) {
     let values = {};
 
-    let handlers = this.getAppsForUri(Services.io.newURI(url, null, null), options);
+    let handlers = this.getAppsForUri(Services.io.newURI(url), options);
     handlers.forEach(function(app) {
       values[app.name] = app;
     }, this);
 
     return values;
   },
 
   get protoSvc() {
--- a/mobile/android/modules/Home.jsm
+++ b/mobile/android/modules/Home.jsm
@@ -21,20 +21,20 @@ const DEFAULT_WEIGHT = 100;
 
 // See bug 915424
 function resolveGeckoURI(aURI) {
   if (!aURI)
     throw "Can't resolve an empty uri";
 
   if (aURI.startsWith("chrome://")) {
     let registry = Cc['@mozilla.org/chrome/chrome-registry;1'].getService(Ci["nsIChromeRegistry"]);
-    return registry.convertChromeURL(Services.io.newURI(aURI, null, null)).spec;
+    return registry.convertChromeURL(Services.io.newURI(aURI)).spec;
   } else if (aURI.startsWith("resource://")) {
     let handler = Services.io.getProtocolHandler("resource").QueryInterface(Ci.nsIResProtocolHandler);
-    return handler.resolveURI(Services.io.newURI(aURI, null, null));
+    return handler.resolveURI(Services.io.newURI(aURI));
   }
   return aURI;
 }
 
 function BannerMessage(options) {
   let uuidgen = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
   this.id = uuidgen.generateUUID().toString();
 
--- a/mobile/android/modules/JavaAddonManager.jsm
+++ b/mobile/android/modules/JavaAddonManager.jsm
@@ -13,20 +13,20 @@ Cu.import("resource://gre/modules/Messag
 Cu.import("resource://gre/modules/Services.jsm"); /*global Services */
 
 function resolveGeckoURI(uri) {
   if (!uri) {
     throw new Error("Can't resolve an empty uri");
   }
   if (uri.startsWith("chrome://")) {
     let registry = Cc['@mozilla.org/chrome/chrome-registry;1'].getService(Ci["nsIChromeRegistry"]);
-    return registry.convertChromeURL(Services.io.newURI(uri, null, null)).spec;
+    return registry.convertChromeURL(Services.io.newURI(uri)).spec;
   } else if (uri.startsWith("resource://")) {
     let handler = Services.io.getProtocolHandler("resource").QueryInterface(Ci.nsIResProtocolHandler);
-    return handler.resolveURI(Services.io.newURI(uri, null, null));
+    return handler.resolveURI(Services.io.newURI(uri));
   }
   return uri;
 }
 
 /**
  * A promise-based API
  */
 var JavaAddonManager = Object.freeze({
--- a/mobile/android/modules/PageActions.jsm
+++ b/mobile/android/modules/PageActions.jsm
@@ -18,20 +18,20 @@ this.EXPORTED_SYMBOLS = ["PageActions"];
 // Copied from browser.js
 // TODO: We should move this method to a common importable location
 function resolveGeckoURI(aURI) {
   if (!aURI)
     throw "Can't resolve an empty uri";
 
   if (aURI.startsWith("chrome://")) {
     let registry = Cc['@mozilla.org/chrome/chrome-registry;1'].getService(Ci["nsIChromeRegistry"]);
-    return registry.convertChromeURL(Services.io.newURI(aURI, null, null)).spec;
+    return registry.convertChromeURL(Services.io.newURI(aURI)).spec;
   } else if (aURI.startsWith("resource://")) {
     let handler = Services.io.getProtocolHandler("resource").QueryInterface(Ci.nsIResProtocolHandler);
-    return handler.resolveURI(Services.io.newURI(aURI, null, null));
+    return handler.resolveURI(Services.io.newURI(aURI));
   }
   return aURI;
 }
 
 var PageActions = {
   _items: { },
 
   _inited: false,
--- a/mobile/android/tests/browser/robocop/robocop_testharness.js
+++ b/mobile/android/tests/browser/robocop/robocop_testharness.js
@@ -9,17 +9,17 @@ function sendMessageToJava(message) {
 
 function _evalURI(uri, sandbox) {
   // We explicitly allow Cross-Origin requests, since it is useful for
   // testing, but we allow relative URLs by maintaining our baseURI.
   let req = SpecialPowers.Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
                          .createInstance();
 
   let baseURI = SpecialPowers.Services.io
-                             .newURI(window.document.baseURI, window.document.characterSet, null);
+                             .newURI(window.document.baseURI, window.document.characterSet);
   let theURI = SpecialPowers.Services.io
                             .newURI(uri, window.document.characterSet, baseURI);
 
   // We append a random slug to avoid caching: see
   // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache.
   req.open('GET', theURI.spec + ((/\?/).test(theURI.spec) ? "&slug=" : "?slug=") + (new Date()).getTime(), false);
   req.setRequestHeader('Cache-Control', 'no-cache');
   req.setRequestHeader('Pragma', 'no-cache');
--- a/modules/libjar/test/unit/test_bug278262.js
+++ b/modules/libjar/test/unit/test_bug278262.js
@@ -4,17 +4,17 @@ var Cc = Components.classes;
 var Ci = Components.interfaces;
 const path = "data/test_bug333423.zip";
 
 function test_relative_sub() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
 
   var spec = "jar:" + ios.newFileURI(do_get_file(path)).spec + "!/";
-  var base = ios.newURI(spec, null, null);
+  var base = ios.newURI(spec);
   var uri = ios.newURI("../modules/libjar", null, base);
 
   // This is the URI we expect to see.
   var expected = "jar:" + ios.newFileURI(do_get_file(path)).spec +
     "!/modules/libjar";
   
   do_check_eq(uri.spec, expected);
 }
--- a/netwerk/cookie/test/unit/test_bug1155169.js
+++ b/netwerk/cookie/test/unit/test_bug1155169.js
@@ -1,13 +1,13 @@
 var {utils: Cu, interfaces: Ci, classes: Cc} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
-const URI = Services.io.newURI("http://example.org/", null, null);
+const URI = Services.io.newURI("http://example.org/");
 
 const cs = Cc["@mozilla.org/cookieService;1"]
              .getService(Ci.nsICookieService);
 
 function run_test() {
   // Allow all cookies.
   Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
 
--- a/netwerk/cookie/test/unit/test_eviction.js
+++ b/netwerk/cookie/test/unit/test_eviction.js
@@ -43,37 +43,37 @@ function run_test() {
     run_next_test();
 }
 
 // Verify that cookies that share a path prefix with the URI path are still considered
 // candidates for eviction, since the paths do not actually match.
 function* test_path_prefix() {
     Services.prefs.setIntPref("network.cookie.maxPerHost", 2);
 
-    const BASE_URI = Services.io.newURI("http://example.org/", null, null);
-    const BASE_BAR = Services.io.newURI("http://example.org/bar/", null, null);
-    const BASE_BARBAR = Services.io.newURI("http://example.org/barbar/", null, null);
+    const BASE_URI = Services.io.newURI("http://example.org/");
+    const BASE_BAR = Services.io.newURI("http://example.org/bar/");
+    const BASE_BARBAR = Services.io.newURI("http://example.org/barbar/");
 
     yield setCookie("session_first", null, null, null, BASE_URI);
     yield setCookie("session_second", null, "/bar", null, BASE_BAR);
     verifyCookies(['session_first', 'session_second'], BASE_URI);
 
     yield setCookie("session_third", null, "/barbar", null, BASE_BARBAR);
     verifyCookies(['session_first', 'session_third'], BASE_URI);
 }
 
 // Verify that subdomains of localhost are treated as separate hosts and aren't considered
 // candidates for eviction.
 function* test_localdomain() {
     Services.prefs.setIntPref("network.cookie.maxPerHost", 2);
 
-    const BASE_URI = Services.io.newURI("http://localhost", null, null);
-    const BASE_BAR = Services.io.newURI("http://localhost/bar", null, null);
-    const OTHER_URI = Services.io.newURI("http://other.localhost", null, null);
-    const OTHER_BAR = Services.io.newURI("http://other.localhost/bar", null, null);
+    const BASE_URI = Services.io.newURI("http://localhost");
+    const BASE_BAR = Services.io.newURI("http://localhost/bar");
+    const OTHER_URI = Services.io.newURI("http://other.localhost");
+    const OTHER_BAR = Services.io.newURI("http://other.localhost/bar");
     
     yield setCookie("session_no_path", null, null, null, BASE_URI);
     yield setCookie("session_bar_path", null, "/bar", null, BASE_BAR);
 
     yield setCookie("session_no_path", null, null, null, OTHER_URI);
     yield setCookie("session_bar_path", null, "/bar", null, OTHER_BAR);
 
     verifyCookies(['session_no_path',
@@ -93,22 +93,22 @@ function* test_localdomain() {
 // Ensure that cookies are still considered candidates for eviction if either the domain
 // or path matches, but not both.
 function* test_domain_or_path_matches_not_both(base_host,
                                                subdomain_host,
                                                other_subdomain_host,
                                                another_subdomain_host) {
     Services.prefs.setIntPref("network.cookie.maxPerHost", 2);
 
-    const BASE_URI = Services.io.newURI("http://" + base_host, null, null);
-    const PUB_FOO_PATH = Services.io.newURI("http://" + subdomain_host + "/foo/", null, null);
-    const WWW_BAR_PATH = Services.io.newURI("http://" + other_subdomain_host + "/bar/", null, null);
-    const OTHER_BAR_PATH = Services.io.newURI("http://" + another_subdomain_host + "/bar/", null, null);
-    const PUB_BAR_PATH = Services.io.newURI("http://" + subdomain_host + "/bar/", null, null);
-    const WWW_FOO_PATH = Services.io.newURI("http://" + other_subdomain_host + "/foo/", null, null);
+    const BASE_URI = Services.io.newURI("http://" + base_host);
+    const PUB_FOO_PATH = Services.io.newURI("http://" + subdomain_host + "/foo/");
+    const WWW_BAR_PATH = Services.io.newURI("http://" + other_subdomain_host + "/bar/");
+    const OTHER_BAR_PATH = Services.io.newURI("http://" + another_subdomain_host + "/bar/");
+    const PUB_BAR_PATH = Services.io.newURI("http://" + subdomain_host + "/bar/");
+    const WWW_FOO_PATH = Services.io.newURI("http://" + other_subdomain_host + "/foo/");
 
     yield setCookie("session_pub_with_foo_path", subdomain_host, "/foo", null, PUB_FOO_PATH);
     yield setCookie("session_www_with_bar_path", other_subdomain_host, "/bar", null, WWW_BAR_PATH);
     verifyCookies(['session_pub_with_foo_path',
                    'session_www_with_bar_path'], BASE_URI);
 
     yield setCookie("session_pub_with_bar_path", subdomain_host, "/bar", null, PUB_BAR_PATH);
     verifyCookies(['session_www_with_bar_path',
@@ -117,21 +117,21 @@ function* test_domain_or_path_matches_no
     yield setCookie("session_other_with_bar_path", another_subdomain_host, "/bar", null, OTHER_BAR_PATH);
     verifyCookies(['session_pub_with_bar_path',
                    'session_other_with_bar_path'], BASE_URI);
 }
 
 function* test_basic_eviction(base_host, subdomain_host, other_subdomain_host) {
     Services.prefs.setIntPref("network.cookie.maxPerHost", 5);
 
-    const BASE_URI = Services.io.newURI("http://" + base_host, null, null);
-    const SUBDOMAIN_URI = Services.io.newURI("http://" + subdomain_host, null, null);
-    const OTHER_SUBDOMAIN_URI = Services.io.newURI("http://" + other_subdomain_host, null, null);
-    const FOO_PATH = Services.io.newURI("http://" + base_host + "/foo/", null, null);
-    const BAR_PATH = Services.io.newURI("http://" + base_host + "/bar/", null, null);
+    const BASE_URI = Services.io.newURI("http://" + base_host);
+    const SUBDOMAIN_URI = Services.io.newURI("http://" + subdomain_host);
+    const OTHER_SUBDOMAIN_URI = Services.io.newURI("http://" + other_subdomain_host);
+    const FOO_PATH = Services.io.newURI("http://" + base_host + "/foo/");
+    const BAR_PATH = Services.io.newURI("http://" + base_host + "/bar/");
     const ALL_SUBDOMAINS = '.' + base_host;
     const OTHER_SUBDOMAIN = other_subdomain_host;
 
     // Initialize the set of cookies with a mix of non-session cookies with no path,
     // and session cookies with explicit paths. Any subsequent cookies added will cause
     // existing cookies to be evicted.
     yield setCookie("non_session_non_path_non_domain", null, null, 100000, BASE_URI);
     yield setCookie("non_session_non_path_subdomain", ALL_SUBDOMAINS, null, 100000, SUBDOMAIN_URI);
--- a/netwerk/protocol/http/UserAgentOverrides.jsm
+++ b/netwerk/protocol/http/UserAgentOverrides.jsm
@@ -120,17 +120,17 @@ this.UserAgentOverrides = {
 
     Services.obs.removeObserver(HTTP_on_useragent_request, "http-on-useragent-request");
   },
 
   receiveMessage: function(aMessage) {
     let name = aMessage.name;
     switch (name) {
       case OVERRIDE_MESSAGE:
-        let uri = Services.io.newURI(aMessage.data.uri, null, null);
+        let uri = Services.io.newURI(aMessage.data.uri);
         return this.getOverrideForURI(uri);
       default:
         throw("Wrong Message in UserAgentOverride: " + name);
     }
   }
 };
 
 function getUserAgentFromOverride(override)
--- a/netwerk/test/browser/browser_child_resource.js
+++ b/netwerk/test/browser/browser_child_resource.js
@@ -56,17 +56,17 @@ registerCleanupFunction(() => {
 });
 
 function frameScript() {
   Components.utils.import("resource://gre/modules/Services.jsm");
   let resProtocol = Components.classes["@mozilla.org/network/protocol;1?name=resource"]
                               .getService(Components.interfaces.nsIResProtocolHandler);
 
   addMessageListener("Test:ResolveURI", function({ data: uri }) {
-    uri = Services.io.newURI(uri, null, null);
+    uri = Services.io.newURI(uri);
     try {
       let resolved = resProtocol.resolveURI(uri);
       sendAsyncMessage("Test:ResolvedURI", resolved);
     }
     catch (e) {
       sendAsyncMessage("Test:ResolvedURI", null);
     }
   });
@@ -90,17 +90,17 @@ function waitForEvent(obj, name, capturi
       resolve(event);
     }
 
     obj.addEventListener(name, listener, capturing, chromeEvent);
   });
 }
 
 function resolveURI(uri) {
-  uri = Services.io.newURI(uri, null, null);
+  uri = Services.io.newURI(uri);
   try {
     return resProtocol.resolveURI(uri);
   }
   catch (e) {
     return null;
   }
 }
 
@@ -158,24 +158,24 @@ add_task(function*() {
   gBrowser.removeCurrentTab();
 });
 
 // Add a mapping, update it then remove it
 add_task(function*() {
   let browser = yield loadTestTab();
 
   info("Set");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content", null, null));
+  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content"));
   let local = resolveURI("resource://testing/test.js");
   let remote = yield remoteResolveURI("resource://testing/test.js");
   is(local, "chrome://global/content/test.js", "Should resolve in main process");
   is(remote, "chrome://global/content/test.js", "Should resolve in child process");
 
   info("Change");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/skin", null, null));
+  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/skin"));
   local = resolveURI("resource://testing/test.js");
   remote = yield remoteResolveURI("resource://testing/test.js");
   is(local, "chrome://global/skin/test.js", "Should resolve in main process");
   is(remote, "chrome://global/skin/test.js", "Should resolve in child process");
 
   info("Clear");
   resProtocol.setSubstitution("testing", null);
   local = resolveURI("resource://testing/test.js");
@@ -186,31 +186,31 @@ add_task(function*() {
   gBrowser.removeCurrentTab();
 });
 
 // Add a mapping, restart the child process then check it is still there
 add_task(function*() {
   let browser = yield loadTestTab();
 
   info("Set");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content", null, null));
+  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content"));
   let local = resolveURI("resource://testing/test.js");
   let remote = yield remoteResolveURI("resource://testing/test.js");
   is(local, "chrome://global/content/test.js", "Should resolve in main process");
   is(remote, "chrome://global/content/test.js", "Should resolve in child process");
 
   yield restart();
 
   local = resolveURI("resource://testing/test.js");
   remote = yield remoteResolveURI("resource://testing/test.js");
   is(local, "chrome://global/content/test.js", "Should resolve in main process");
   is(remote, "chrome://global/content/test.js", "Should resolve in child process");
 
   info("Change");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/skin", null, null));
+  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/skin"));
 
   yield restart();
 
   local = resolveURI("resource://testing/test.js");
   remote = yield remoteResolveURI("resource://testing/test.js");
   is(local, "chrome://global/skin/test.js", "Should resolve in main process");
   is(remote, "chrome://global/skin/test.js", "Should resolve in child process");
 
@@ -227,18 +227,18 @@ add_task(function*() {
   gBrowser.removeCurrentTab();
 });
 
 // Adding a mapping to a resource URI should work
 add_task(function*() {
   let browser = yield loadTestTab();
 
   info("Set");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content", null, null));
-  resProtocol.setSubstitution("testing2", Services.io.newURI("resource://testing", null, null));
+  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content"));
+  resProtocol.setSubstitution("testing2", Services.io.newURI("resource://testing"));
   let local = resolveURI("resource://testing2/test.js");
   let remote = yield remoteResolveURI("resource://testing2/test.js");
   is(local, "chrome://global/content/test.js", "Should resolve in main process");
   is(remote, "chrome://global/content/test.js", "Should resolve in child process");
 
   info("Clear");
   resProtocol.setSubstitution("testing", null);
   local = resolveURI("resource://testing2/test.js");
--- a/netwerk/test/httpserver/httpd.js
+++ b/netwerk/test/httpserver/httpd.js
@@ -1743,17 +1743,17 @@ RequestReader.prototype =
         dumpn("*** Metadata version too low");
         throw HTTP_400;
       }
 
       try
       {
         var uri = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService)
-                    .newURI(fullPath, null, null);
+                    .newURI(fullPath);
         fullPath = uri.path;
         scheme = uri.scheme;
         host = metadata._host = uri.asciiHost;
         port = uri.port;
         if (port === -1)
         {
           if (scheme === "http")
           {
--- a/netwerk/test/httpserver/test/test_default_index_handler.js
+++ b/netwerk/test/httpserver/test/test_default_index_handler.js
@@ -127,17 +127,17 @@ function hiddenDataCheck(bytes, uri, pat
   var lst = body.getElementsByTagName("ol");
   do_check_eq(lst.length, 1);
   var items = lst.item(0).QueryInterface(Ci.nsIDOMElement)
                          .getElementsByTagName("li");
 
   var ios = Cc["@mozilla.org/network/io-service;1"]
               .getService(Ci.nsIIOService);
 
-  var top = ios.newURI(uri, null, null);
+  var top = ios.newURI(uri);
 
   // N.B. No ERROR_IF_SEE_THIS.txt^ file!
   var dirEntries = [{name: "file.txt", isDirectory: false},
                     {name: "SHOULD_SEE_THIS.txt^", isDirectory: false}];
 
   for (var i = 0; i < items.length; i++)
   {
     var link = items.item(i)
@@ -211,17 +211,17 @@ function dataCheck(bytes, uri, path, dir
   var lst = body.getElementsByTagName("ol");
   do_check_eq(lst.length, 1);
   var items = lst.item(0).QueryInterface(Ci.nsIDOMElement)
                          .getElementsByTagName("li");
 
   var ios = Cc["@mozilla.org/network/io-service;1"]
               .getService(Ci.nsIIOService);
 
-  var dirURI = ios.newURI(uri, null, null);
+  var dirURI = ios.newURI(uri);
 
   for (var i = 0; i < items.length; i++)
   {
     var link = items.item(i)
                     .childNodes
                     .item(0)
                     .QueryInterface(Ci.nsIDOMNode)
                     .QueryInterface(Ci.nsIDOMElement);
--- a/netwerk/test/unit/head_cache.js
+++ b/netwerk/test/unit/head_cache.js
@@ -34,17 +34,17 @@ function evict_cache_entries(where)
     storage.asyncEvictStorage(null);
   }
 }
 
 function createURI(urispec)
 {
   var ioServ = Components.classes["@mozilla.org/network/io-service;1"]
                          .getService(Components.interfaces.nsIIOService);
-  return ioServ.newURI(urispec, null, null);
+  return ioServ.newURI(urispec);
 }
 
 function getCacheStorage(where, lci, appcache)
 {
   if (!lci) lci = LoadContextInfo.default;
   var svc = get_cache_service();
   switch (where) {
     case "disk": return svc.diskCacheStorage(lci, false);
--- a/netwerk/test/unit/test_304_responses.js
+++ b/netwerk/test/unit/test_304_responses.js
@@ -17,17 +17,17 @@ XPCOMUtils.defineLazyGetter(this, "baseU
 });
 
 const unexpected304 = "unexpected304";
 const existingCached304 = "existingCached304";
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 function make_channel(url) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true})
                 .QueryInterface(Ci.nsIHttpChannel);
 }
 
 function clearCache() {
--- a/netwerk/test/unit/test_NetUtil.js
+++ b/netwerk/test/unit/test_NetUtil.js
@@ -221,17 +221,17 @@ function test_newURI_no_spec_throws()
 
 function test_newURI()
 {
   let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
 
   // Check that we get the same URI back from the IO service and the utility
   // method.
   const TEST_URI = "http://mozilla.org";
-  let iosURI = ios.newURI(TEST_URI, null, null);
+  let iosURI = ios.newURI(TEST_URI);
   let NetUtilURI = NetUtil.newURI(TEST_URI);
   do_check_true(iosURI.equals(NetUtilURI));
 
   run_next_test();
 }
 
 function test_newURI_takes_nsIFile()
 {
--- a/netwerk/test/unit/test_URIs.js
+++ b/netwerk/test/unit/test_URIs.js
@@ -564,29 +564,27 @@ function do_test_immutable(aTest) {
 
 
 // TEST MAIN FUNCTION
 // ------------------
 function run_test()
 {
   // UTF-8 check - From bug 622981
   // ASCII
-  let base = gIoService.newURI("http://example.org/xenia?", null, null);
+  let base = gIoService.newURI("http://example.org/xenia?");
   let resolved = gIoService.newURI("?x", null, base);
-  let expected = gIoService.newURI("http://example.org/xenia?x",
-                                  null, null);
+  let expected = gIoService.newURI("http://example.org/xenia?x");
   do_info("Bug 662981: ACSII - comparing " + resolved.spec + " and " + expected.spec);
   do_check_true(resolved.equals(expected));
 
   // UTF-8 character "è"
   // Bug 622981 was triggered by an empty query string
-  base = gIoService.newURI("http://example.org/xènia?", null, null);
+  base = gIoService.newURI("http://example.org/xènia?");
   resolved = gIoService.newURI("?x", null, base);
-  expected = gIoService.newURI("http://example.org/xènia?x",
-                              null, null);
+  expected = gIoService.newURI("http://example.org/xènia?x");
   do_info("Bug 662981: UTF8 - comparing " + resolved.spec + " and " + expected.spec);
   do_check_true(resolved.equals(expected));
 
   gTests.forEach(function(aTest) {
     // Check basic URI functionality
     do_test_uri_basic(aTest);
 
     if (!aTest.fail) {
--- a/netwerk/test/unit/test_URIs2.js
+++ b/netwerk/test/unit/test_URIs2.js
@@ -649,29 +649,27 @@ function do_test_immutable(aTest) {
 
 
 // TEST MAIN FUNCTION
 // ------------------
 function run_test()
 {
   // UTF-8 check - From bug 622981
   // ASCII
-  let base = gIoService.newURI("http://example.org/xenia?", null, null);
+  let base = gIoService.newURI("http://example.org/xenia?");
   let resolved = gIoService.newURI("?x", null, base);
-  let expected = gIoService.newURI("http://example.org/xenia?x",
-                                  null, null);
+  let expected = gIoService.newURI("http://example.org/xenia?x");
   do_info("Bug 662981: ACSII - comparing " + resolved.spec + " and " + expected.spec);
   do_check_true(resolved.equals(expected));
 
   // UTF-8 character "è"
   // Bug 622981 was triggered by an empty query string
-  base = gIoService.newURI("http://example.org/xènia?", null, null);
+  base = gIoService.newURI("http://example.org/xènia?");
   resolved = gIoService.newURI("?x", null, base);
-  expected = gIoService.newURI("http://example.org/xènia?x",
-                              null, null);
+  expected = gIoService.newURI("http://example.org/xènia?x");
   do_info("Bug 662981: UTF8 - comparing " + resolved.spec + " and " + expected.spec);
   do_check_true(resolved.equals(expected));
 
   gTests.forEach(function(aTest) {
     // Check basic URI functionality
     do_test_uri_basic(aTest);
 
     if (!aTest.fail) {
--- a/netwerk/test/unit/test_about_networking.js
+++ b/netwerk/test/unit/test_about_networking.js
@@ -78,18 +78,17 @@ add_test(function test_sockets() {
 });
 
 function run_test() {
   let ioService = Cc["@mozilla.org/network/io-service;1"]
     .getService(Ci.nsIIOService);
 
   gHttpServer.start(-1);
 
-  let uri = ioService.newURI("http://localhost:" + gHttpServer.identity.primaryPort,
-                             null, null);
+  let uri = ioService.newURI("http://localhost:" + gHttpServer.identity.primaryPort);
   let channel = NetUtil.newChannel({uri: uri, loadUsingSystemPrincipal: true});
 
   channel.open2();
 
   gServerSocket.init(-1, true, -1);
 
   run_next_test();
 }
--- a/netwerk/test/unit/test_about_protocol.js
+++ b/netwerk/test/unit/test_about_protocol.js
@@ -7,17 +7,17 @@ var Cc = Components.classes;
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/NetUtil.jsm");
 
 var unsafeAboutModule = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
   newChannel: function (aURI, aLoadInfo) {
-    var uri = Services.io.newURI("about:blank", null, null);
+    var uri = Services.io.newURI("about:blank");
     let chan = Services.io.newChannelFromURIWithLoadInfo(uri, aLoadInfo);
     chan.owner = Services.scriptSecurityManager.getSystemPrincipal();
     return chan;
   },
   getURIFlags: function (aURI) {
     return Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT;
   }
 };
--- a/netwerk/test/unit/test_aboutblank.js
+++ b/netwerk/test/unit/test_aboutblank.js
@@ -1,13 +1,13 @@
 Cu.import("resource://gre/modules/NetUtil.jsm");
 
 function run_test() {
-  var base = NetUtil.newURI("http://www.example.com", null, null);
-  var about1 = NetUtil.newURI("about:blank", null, null);
+  var base = NetUtil.newURI("http://www.example.com");
+  var about1 = NetUtil.newURI("about:blank");
   var about2 = NetUtil.newURI("about:blank", null, base);
 
   var chan1 = NetUtil.newChannel({
     uri: about1,
     loadUsingSystemPrincipal: true 
   }).QueryInterface(Components.interfaces.nsIPropertyBag2);
 
   var chan2 = NetUtil.newChannel({
--- a/netwerk/test/unit/test_auth_dialog_permission.js
+++ b/netwerk/test/unit/test_auth_dialog_permission.js
@@ -108,17 +108,17 @@ Requestor.prototype = {
   },
 
   prompter: null
 };
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 function makeChan(loadingUrl, url, contentPolicy) {
   var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   var uri = make_uri(loadingUrl);
   var principal = ssm.createCodebasePrincipal(uri, {});
 
--- a/netwerk/test/unit/test_auth_jar.js
+++ b/netwerk/test/unit/test_auth_jar.js
@@ -1,15 +1,15 @@
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function createURI(s) {
   let service = Components.classes["@mozilla.org/network/io-service;1"]
                 .getService(Components.interfaces.nsIIOService);
-  return service.newURI(s, null, null);
+  return service.newURI(s);
 }
  
 function run_test() {
   // Set up a profile.
   do_get_profile();
 
   var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
   const kURI1 = "http://example.com";
--- a/netwerk/test/unit/test_authentication.js
+++ b/netwerk/test/unit/test_authentication.js
@@ -285,17 +285,17 @@ var listener = {
   }
 };
 
 function makeChan(url, loadingUrl) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
   var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
-  var principal = ssm.createCodebasePrincipal(ios.newURI(loadingUrl, null, null), {});
+  var principal = ssm.createCodebasePrincipal(ios.newURI(loadingUrl), {});
   return NetUtil.newChannel(
     { uri: url, loadingPrincipal: principal,
       securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
       contentPolicyType: Components.interfaces.nsIContentPolicy.TYPE_OTHER
     });
 }
 
 var tests = [test_noauth, test_returnfalse1, test_wrongpw1, test_prompt1,
--- a/netwerk/test/unit/test_authpromptwrapper.js
+++ b/netwerk/test/unit/test_authpromptwrapper.js
@@ -96,17 +96,17 @@ function run_test() {
         // for those cases
         do_check_eq(text.indexOf("-1"), -1);
       }
     }
   };
 
 
   // Also have to make up a channel
-  var uri = NetUtil.newURI("http://" + host, "", null)
+  var uri = NetUtil.newURI("http://" + host, "")
   var chan = NetUtil.newChannel({
     uri: uri,
     loadUsingSystemPrincipal: true
   });
 
   function do_tests(expectedRV) {
     var prompt1;
     var wrapper;
@@ -197,17 +197,17 @@ function run_test() {
 
     info.flags &= ~nsIAuthInformation.NEED_DOMAIN;
 
     info.domain = "";
     info.username = "";
     info.password = "";
 
     // 5: FTP
-    var uri2 = NetUtil.newURI("ftp://" + host, "", null);
+    var uri2 = NetUtil.newURI("ftp://" + host, "");
     var ftpchan = NetUtil.newChannel({
       uri: uri2,
       loadUsingSystemPrincipal: true 
     });
 
     prompt1 = new Prompt1();
     prompt1.rv = expectedRV;
     prompt1.scheme = "ftp";
--- a/netwerk/test/unit/test_bug1195415.js
+++ b/netwerk/test/unit/test_bug1195415.js
@@ -2,115 +2,115 @@
 
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
         getService(Ci.nsIIOService);
   var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"].
         getService(Ci.nsIScriptSecurityManager);
 
   // NON-UNICODE
-  var uri = ios.newURI("http://foo.com/file.txt", null, null);
+  var uri = ios.newURI("http://foo.com/file.txt");
   do_check_eq(uri.asciiHostPort, "foo.com");
   uri.port = 90;
   var prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "foo.com:90");
   do_check_eq(prin.origin, "http://foo.com:90");
 
-  uri = ios.newURI("http://foo.com:10/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:10/file.txt");
   do_check_eq(uri.asciiHostPort, "foo.com:10");
   uri.port = 500;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "foo.com:500");
   do_check_eq(prin.origin, "http://foo.com:500");
 
-  uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "foo.com:5000");
   uri.port = 20;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "foo.com:20");
   do_check_eq(prin.origin, "http://foo.com:20");
 
-  uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "foo.com:5000");
   uri.port = -1;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "foo.com");
   do_check_eq(prin.origin, "http://foo.com");
 
-  uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "foo.com:5000");
   uri.port = 80;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "foo.com");
   do_check_eq(prin.origin, "http://foo.com");
 
   // UNICODE
-  uri = ios.newURI("http://jos\u00e9.example.net.ch/file.txt", null, null);
+  uri = ios.newURI("http://jos\u00e9.example.net.ch/file.txt");
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch");
   uri.port = 90;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch:90");
   do_check_eq(prin.origin, "http://xn--jos-dma.example.net.ch:90");
 
-  uri = ios.newURI("http://jos\u00e9.example.net.ch:10/file.txt", null, null);
+  uri = ios.newURI("http://jos\u00e9.example.net.ch:10/file.txt");
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch:10");
   uri.port = 500;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch:500");
   do_check_eq(prin.origin, "http://xn--jos-dma.example.net.ch:500");
 
-  uri = ios.newURI("http://jos\u00e9.example.net.ch:5000/file.txt", null, null);
+  uri = ios.newURI("http://jos\u00e9.example.net.ch:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch:5000");
   uri.port = 20;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch:20");
   do_check_eq(prin.origin, "http://xn--jos-dma.example.net.ch:20");
 
-  uri = ios.newURI("http://jos\u00e9.example.net.ch:5000/file.txt", null, null);
+  uri = ios.newURI("http://jos\u00e9.example.net.ch:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch:5000");
   uri.port = -1;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch");
   do_check_eq(prin.origin, "http://xn--jos-dma.example.net.ch");
 
-  uri = ios.newURI("http://jos\u00e9.example.net.ch:5000/file.txt", null, null);
+  uri = ios.newURI("http://jos\u00e9.example.net.ch:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch:5000");
   uri.port = 80;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "xn--jos-dma.example.net.ch");
   do_check_eq(prin.origin, "http://xn--jos-dma.example.net.ch");
 
   // ipv6
-  uri = ios.newURI("http://[123:45::678]/file.txt", null, null);
+  uri = ios.newURI("http://[123:45::678]/file.txt");
   do_check_eq(uri.asciiHostPort, "[123:45::678]");
   uri.port = 90;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "[123:45::678]:90");
   do_check_eq(prin.origin, "http://[123:45::678]:90");
 
-  uri = ios.newURI("http://[123:45::678]:10/file.txt", null, null);
+  uri = ios.newURI("http://[123:45::678]:10/file.txt");
   do_check_eq(uri.asciiHostPort, "[123:45::678]:10");
   uri.port = 500;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "[123:45::678]:500");
   do_check_eq(prin.origin, "http://[123:45::678]:500");
 
-  uri = ios.newURI("http://[123:45::678]:5000/file.txt", null, null);
+  uri = ios.newURI("http://[123:45::678]:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "[123:45::678]:5000");
   uri.port = 20;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "[123:45::678]:20");
   do_check_eq(prin.origin, "http://[123:45::678]:20");
 
-  uri = ios.newURI("http://[123:45::678]:5000/file.txt", null, null);
+  uri = ios.newURI("http://[123:45::678]:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "[123:45::678]:5000");
   uri.port = -1;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "[123:45::678]");
   do_check_eq(prin.origin, "http://[123:45::678]");
 
-  uri = ios.newURI("http://[123:45::678]:5000/file.txt", null, null);
+  uri = ios.newURI("http://[123:45::678]:5000/file.txt");
   do_check_eq(uri.asciiHostPort, "[123:45::678]:5000");
   uri.port = 80;
   prin = ssm.createCodebasePrincipal(uri, {});
   do_check_eq(uri.asciiHostPort, "[123:45::678]");
   do_check_eq(prin.origin, "http://[123:45::678]");
 }
--- a/netwerk/test/unit/test_bug261425.js
+++ b/netwerk/test/unit/test_bug261425.js
@@ -1,13 +1,13 @@
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
-  var newURI = ios.newURI("http://foo.com", null, null);
+  var newURI = ios.newURI("http://foo.com");
 
   var success = false;
   try {
     newURI.spec = "http: //foo.com";
   }
   catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
--- a/netwerk/test/unit/test_bug321706.js
+++ b/netwerk/test/unit/test_bug321706.js
@@ -1,11 +1,11 @@
 const url = "http://foo.com/folder/file?/.";
 
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
-  var newURI = ios.newURI(url, null, null);
+  var newURI = ios.newURI(url);
   do_check_eq(newURI.spec, url);
   do_check_eq(newURI.path, "/folder/file?/.");
   do_check_eq(newURI.resolve("./file?/."), url);
 }
--- a/netwerk/test/unit/test_bug337744.js
+++ b/netwerk/test/unit/test_bug337744.js
@@ -22,25 +22,25 @@ const error_specs = [
   "resource://res-test/..\\",
   "resource://res-test/..\\..\\",
   "resource://res-test/..%5C",
   "resource://res-test/..%5c",
 ];
 
 // Create some fake principal that has not enough
 // privileges to access any resource: uri.
-var uri = NetUtil.newURI("http://www.example.com", null, null);
+var uri = NetUtil.newURI("http://www.example.com");
 var principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
 
 function get_channel(spec)
 {
-  var channelURI = NetUtil.newURI(spec, null, null);
+  var channelURI = NetUtil.newURI(spec);
 
   var channel = NetUtil.newChannel({
-    uri: NetUtil.newURI(spec, null, null),
+    uri: NetUtil.newURI(spec),
     loadingPrincipal: principal,
     securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
     contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER
   });
 
   try {
     channel.asyncOpen2(null);
     ok(false, "asyncOpen2() of URI: " + spec + "should throw");
@@ -94,18 +94,18 @@ function run_test() {
   let rootFile = Services.dirsvc.get("GreD", Ci.nsIFile);
   let rootURI = Services.io.newFileURI(rootFile);
 
   resProto.setSubstitution("res-test", rootURI);
   do_register_cleanup(() => {
     resProto.setSubstitution("res-test", null);
   });
 
-  let baseRoot = resProto.resolveURI(Services.io.newURI("resource:///", null, null));
-  let greRoot = resProto.resolveURI(Services.io.newURI("resource://gre/", null, null));
+  let baseRoot = resProto.resolveURI(Services.io.newURI("resource:///"));
+  let greRoot = resProto.resolveURI(Services.io.newURI("resource://gre/"));
 
   for (var spec of specs) {
     check_safe_resolution(spec, rootURI.spec);
     check_safe_resolution(spec.replace("res-test", ""), baseRoot);
     check_safe_resolution(spec.replace("res-test", "gre"), greRoot);
   }
 
   for (var spec of error_specs) {
--- a/netwerk/test/unit/test_bug368702.js
+++ b/netwerk/test/unit/test_bug368702.js
@@ -94,17 +94,17 @@ function run_test() {
     do_check_eq(e.result, Cr.NS_ERROR_HOST_IS_IP_ADDRESS);
   }
 
   // check normalization: output should be consistent with
   // nsIURI::GetAsciiHost(), i.e. lowercased and ASCII/ACE encoded
   var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                             .getService(Components.interfaces.nsIIOService);
 
-  var uri = ioService.newURI("http://b\u00FCcher.co.uk", null, null);
+  var uri = ioService.newURI("http://b\u00FCcher.co.uk");
   do_check_eq(tld.getBaseDomain(uri), "xn--bcher-kva.co.uk");
   do_check_eq(tld.getBaseDomainFromHost("b\u00FCcher.co.uk"), "xn--bcher-kva.co.uk");
   do_check_eq(tld.getPublicSuffix(uri), "co.uk");
   do_check_eq(tld.getPublicSuffixFromHost("b\u00FCcher.co.uk"), "co.uk");
 
   // check that malformed hosts are rejected as invalid args
   try {
     etld = tld.getBaseDomainFromHost("domain.co.uk..");
--- a/netwerk/test/unit/test_bug371473.js
+++ b/netwerk/test/unit/test_bug371473.js
@@ -1,15 +1,15 @@
 function test_not_too_long() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
   var spec = "jar:http://example.com/bar.jar!/";
   try {
-    var newURI = ios.newURI(spec, null, null);
+    var newURI = ios.newURI(spec);
   }
   catch (e) {
     do_throw("newURI threw even though it wasn't passed a large nested URI?");
   }
 }
 
 function test_too_long() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
@@ -26,17 +26,17 @@ function test_too_long() {
   }
 
   var spec = prefix + "http://example.com/bar.jar" + suffix;
   try {
     // The following will produce a recursive call that if
     // unchecked would lead to a stack overflow. If we
     // do not crash here and thus an exception is caught
     // we have passed the test.
-    var newURI = ios.newURI(spec, null, null);
+    var newURI = ios.newURI(spec);
   }
   catch (e) {
     return;
   }
 }
 
 function run_test() {
   test_not_too_long();
--- a/netwerk/test/unit/test_bug376844.js
+++ b/netwerk/test/unit/test_bug376844.js
@@ -10,12 +10,12 @@ const testURLs = [
 ]
 
 function run_test() {
   var ioServ =
     Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
   for (var i = 0; i < testURLs.length; i++) {
-    var uri = ioServ.newURI(testURLs[i][0], null, null);
+    var uri = ioServ.newURI(testURLs[i][0]);
     do_check_eq(uri.spec, testURLs[i][1]);
   }
 }
--- a/netwerk/test/unit/test_bug379034.js
+++ b/netwerk/test/unit/test_bug379034.js
@@ -1,13 +1,13 @@
 function run_test() {
   const ios = Components.classes["@mozilla.org/network/io-service;1"]
                         .getService(Components.interfaces.nsIIOService);
 
-  var base = ios.newURI("http://localhost/bug379034/index.html", null, null);
+  var base = ios.newURI("http://localhost/bug379034/index.html");
 
   var uri = ios.newURI("http:a.html", null, base);
   do_check_eq(uri.spec, "http://localhost/bug379034/a.html");
 
   uri = ios.newURI("HtTp:b.html", null, base);
   do_check_eq(uri.spec, "http://localhost/bug379034/b.html");
 
   uri = ios.newURI("https:c.html", null, base);
--- a/netwerk/test/unit/test_bug380994.js
+++ b/netwerk/test/unit/test_bug380994.js
@@ -10,13 +10,13 @@ const specs = [
   "resource:///%2e%2e"
 ];
 
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
 
   for (var spec of specs) {
-    var uri = ios.newURI(spec, null, null);
+    var uri = ios.newURI(spec);
     if (uri.spec.indexOf("..") != -1)
       do_throw("resource: traversal remains: '"+spec+"' ==> '"+uri.spec+"'");
   }
 }
--- a/netwerk/test/unit/test_bug388281.js
+++ b/netwerk/test/unit/test_bug388281.js
@@ -1,24 +1,24 @@
 function run_test() {
   const ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
-  var uri = ios.newURI("http://foo.com/file.txt", null, null);
+  var uri = ios.newURI("http://foo.com/file.txt");
   uri.port = 90;
   do_check_eq(uri.hostPort, "foo.com:90");
 
-  uri = ios.newURI("http://foo.com:10/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:10/file.txt");
   uri.port = 500;
   do_check_eq(uri.hostPort, "foo.com:500");
   
-  uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:5000/file.txt");
   uri.port = 20;
   do_check_eq(uri.hostPort, "foo.com:20");
 
-  uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:5000/file.txt");
   uri.port = -1;
   do_check_eq(uri.hostPort, "foo.com");
 
-  uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
+  uri = ios.newURI("http://foo.com:5000/file.txt");
   uri.port = 80;
   do_check_eq(uri.hostPort, "foo.com");
 }
--- a/netwerk/test/unit/test_bug396389.js
+++ b/netwerk/test/unit/test_bug396389.js
@@ -24,17 +24,17 @@ var prefData =
       newVal: true
     }
   ];
 
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
-  var uri1 = ios.newURI("file:///", null, null);
+  var uri1 = ios.newURI("file:///");
   do_check_true(uri1 instanceof Ci.nsIFileURL);
 
   var uri2 = uri1.clone();
   do_check_true(uri2 instanceof Ci.nsIFileURL);
   do_check_true(uri1.equals(uri2));
 
   var uri3 = round_trip(uri1);
   do_check_true(uri3 instanceof Ci.nsIFileURL);
@@ -49,17 +49,17 @@ function run_test() {
     } catch(e) {
     }
     prefs.setBoolPref(pref.name, pref.newVal);
   }
   
   try {
     // URI stolen from
     // http://lists.w3.org/Archives/Public/public-iri/2004Mar/0012.html
-    var uri4 = ios.newURI("http://xn--jos-dma.example.net.ch/", null, null);
+    var uri4 = ios.newURI("http://xn--jos-dma.example.net.ch/");
     do_check_eq(uri4.asciiHost, "xn--jos-dma.example.net.ch");
     do_check_eq(uri4.host, "jos\u00e9.example.net.ch");
     
     var uri5 = round_trip(uri4);
     do_check_true(uri4.equals(uri5));
     do_check_eq(uri4.host, uri5.host);
     do_check_eq(uri4.asciiHost, uri5.asciiHost);
   } finally {
--- a/netwerk/test/unit/test_bug412457.js
+++ b/netwerk/test/unit/test_bug412457.js
@@ -1,14 +1,14 @@
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
   // check if hostname is unescaped before applying IDNA
-  var newURI = ios.newURI("http://\u5341%2ecom/", null, null);
+  var newURI = ios.newURI("http://\u5341%2ecom/");
   do_check_eq(newURI.asciiHost, "xn--kkr.com");
 
   // escaped UTF8
   newURI.spec = "http://%e5%8d%81.com";
   do_check_eq(newURI.asciiHost, "xn--kkr.com");
 
   // There should be only allowed characters in hostname after
   // unescaping and attempting to apply IDNA. "\x80" is illegal in
--- a/netwerk/test/unit/test_bug429347.js
+++ b/netwerk/test/unit/test_bug429347.js
@@ -1,14 +1,14 @@
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
-  var uri1 = ios.newURI("http://example.com#bar", null, null);
-  var uri2 = ios.newURI("http://example.com/#bar", null, null);
+  var uri1 = ios.newURI("http://example.com#bar");
+  var uri2 = ios.newURI("http://example.com/#bar");
   do_check_true(uri1.equals(uri2));
 
   uri1.spec = "http://example.com?bar";
   uri2.spec = "http://example.com/?bar";
   do_check_true(uri1.equals(uri2));
 
   // see https://bugzilla.mozilla.org/show_bug.cgi?id=665706
   // ";" is not parsed as special anymore and thus ends up
--- a/netwerk/test/unit/test_bug455311.js
+++ b/netwerk/test/unit/test_bug455311.js
@@ -10,17 +10,17 @@ function getLinkFile()
   }
   do_throw("Unexpected platform");
   return null;
 }
 
 const ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
 var link;
 var linkURI;
-const newURI = ios.newURI("http://www.mozilla.org/", null, null);
+const newURI = ios.newURI("http://www.mozilla.org/");
   
 function NotificationCallbacks(origURI, newURI)
 {
   this._origURI = origURI;
   this._newURI = newURI;
 }
 NotificationCallbacks.prototype = {
   QueryInterface: function(iid)
--- a/netwerk/test/unit/test_bug479485.js
+++ b/netwerk/test/unit/test_bug479485.js
@@ -2,27 +2,27 @@ function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
     
   var test_port = function(port, exception_expected)
   {
     dump((port || "no port provided") + "\n");
     var exception_threw = false;
     try {
-      var newURI = ios.newURI("http://foo.com"+port, null, null);
+      var newURI = ios.newURI("http://foo.com"+port);
     }
     catch (e) {
       exception_threw = e.result == Cr.NS_ERROR_MALFORMED_URI;
     }
     if (exception_threw != exception_expected)
       do_throw("We did"+(exception_expected?"n't":"")+" throw NS_ERROR_MALFORMED_URI when creating a new URI with "+port+" as a port");
     do_check_eq(exception_threw, exception_expected);
   
     exception_threw = false;
-    newURI = ios.newURI("http://foo.com", null, null);
+    newURI = ios.newURI("http://foo.com");
     try {
       newURI.spec = "http://foo.com"+port;
     }
     catch (e) {
       exception_threw = e.result == Cr.NS_ERROR_MALFORMED_URI;
     }
     if (exception_threw != exception_expected)
       do_throw("We did"+(exception_expected?"n't":"")+" throw NS_ERROR_MALFORMED_URI when setting a spec of a URI with "+port+" as a port");
--- a/netwerk/test/unit/test_bug504014.js
+++ b/netwerk/test/unit/test_bug504014.js
@@ -47,23 +47,23 @@ var invalid_URIs = [ "http://[1]/",
                      "http://[1:2:3:4:5:6:7:255.255.255.255]/"];
 
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
 
   for (var i=0 ; i<valid_URIs.length ; i++) {
     try {
-      var uri = ios.newURI(valid_URIs[i], null, null);
+      var uri = ios.newURI(valid_URIs[i]);
     } catch (e) {
       do_throw("cannot create URI:" + valid_URIs[i]);
     }
   }
 
   for (var i=0 ; i<invalid_URIs.length ; i++) {
     try {
-      var uri = ios.newURI(invalid_URIs[i], null, null);
+      var uri = ios.newURI(invalid_URIs[i]);
       do_throw("should throw: " + invalid_URIs[i]);
     } catch (e) {
       do_check_eq(e.result, Cr.NS_ERROR_MALFORMED_URI);
     }
   }
 }
--- a/netwerk/test/unit/test_bug528292.js
+++ b/netwerk/test/unit/test_bug528292.js
@@ -69,17 +69,17 @@ function run_test()
     loadUsingSystemPrincipal: true
   }).QueryInterface(Ci.nsIHttpChannel)
     .QueryInterface(Ci.nsIHttpChannelInternal);
   chan.forceAllowThirdPartyCookie = true;
 
   // Set a cookie on one of the URIs.  It doesn't matter which one, since
   // they're both from the same host, which is enough for the cookie service
   // to send the cookie with both requests.
-  var postRedirectURI = ioService.newURI(postRedirectURL, "", null);
+  var postRedirectURI = ioService.newURI(postRedirectURL, "");
   Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService).
     setCookieString(postRedirectURI, null, sentCookieVal, chan);
 
   // Load the pre-redirect URI.
   chan.asyncOpen2(new ChannelListener(finish_test, null));
   do_test_pending();
 }
 
--- a/netwerk/test/unit/test_bug580508.js
+++ b/netwerk/test/unit/test_bug580508.js
@@ -1,26 +1,24 @@
 var ioService = Cc["@mozilla.org/network/io-service;1"]
                 .getService(Ci.nsIIOService);
 var resProt = ioService.getProtocolHandler("resource")
               .QueryInterface(Ci.nsIResProtocolHandler);
 
 function run_test() {
     // Define a resource:// alias that points to another resource:// URI.
-    let greModulesURI = ioService.newURI("resource://gre/modules/", null, null);
+    let greModulesURI = ioService.newURI("resource://gre/modules/");
     resProt.setSubstitution("my-gre-modules", greModulesURI);
 
     // When we ask for the alias, we should not get the resource://
     // URI that we registered it for but the original file URI.
     let greFileSpec = ioService.newURI("modules/", null,
                                        resProt.getSubstitution("gre")).spec;
     let aliasURI = resProt.getSubstitution("my-gre-modules");
     do_check_eq(aliasURI.spec, greFileSpec);
 
     // Resolving URIs using the original resource path and the alias
     // should yield the same result.
-    let greNetUtilURI = ioService.newURI("resource://gre/modules/NetUtil.jsm",
-                                         null, null);
-    let myNetUtilURI = ioService.newURI("resource://my-gre-modules/NetUtil.jsm",
-                                        null, null);
+    let greNetUtilURI = ioService.newURI("resource://gre/modules/NetUtil.jsm");
+    let myNetUtilURI = ioService.newURI("resource://my-gre-modules/NetUtil.jsm");
     do_check_eq(resProt.resolveURI(greNetUtilURI),
                 resProt.resolveURI(myNetUtilURI));
 }
--- a/netwerk/test/unit/test_bug667818.js
+++ b/netwerk/test/unit/test_bug667818.js
@@ -1,14 +1,14 @@
 Cu.import("resource://gre/modules/Services.jsm");
 
 function makeURI(str) {
     return Components.classes["@mozilla.org/network/io-service;1"]
                      .getService(Components.interfaces.nsIIOService)
-                     .newURI(str, null, null);
+                     .newURI(str);
 }
 
 function run_test() {
     // Allow all cookies.
     Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
     var serv =   Components.classes["@mozilla.org/cookieService;1"]
                            .getService(Components.interfaces.nsICookieService);
     var uri = makeURI("http://example.com/");
--- a/netwerk/test/unit/test_bug767025.js
+++ b/netwerk/test/unit/test_bug767025.js
@@ -123,18 +123,18 @@ function watch_update(update, stateChang
 }
 
 function start_and_watch_app_cache(manifestURL,
                                  pageURL,
                                  stateChangeHandler,
                                  cacheAvailHandler) {
   let ioService = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
-  let update = do_app_cache(ioService.newURI(manifestURL, null, null),
-                            ioService.newURI(pageURL, null, null));
+  let update = do_app_cache(ioService.newURI(manifestURL),
+                            ioService.newURI(pageURL));
   watch_update(update, stateChangeHandler, cacheAvailHandler);
   return update;
 }
 
 const {STATE_FINISHED: STATE_FINISHED,
        STATE_CHECKING: STATE_CHECKING,
        STATE_ERROR: STATE_ERROR } = Ci.nsIOfflineCacheUpdateObserver;
 
--- a/netwerk/test/unit/test_cache-control_request.js
+++ b/netwerk/test/unit/test_cache-control_request.js
@@ -29,17 +29,17 @@ function make_channel(url, cache_control
   }
 
   return req;
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 function resource_age_100_handler(metadata, response)
 {
   hit_server = true;
 
   response.setStatusLine(metadata.httpVersion, 200, "OK");
   response.setHeader("Content-Type", "text/plain", false);
--- a/netwerk/test/unit/test_cacheForOfflineUse_no-store.js
+++ b/netwerk/test/unit/test_cacheForOfflineUse_no-store.js
@@ -29,17 +29,17 @@ function make_channel_for_offline_use(ur
   var appCacheChan = chan.QueryInterface(Ci.nsIApplicationCacheChannel);
   appCacheChan.applicationCacheForWrite = appCache;
   return chan;
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 const responseBody = "response body";
 
 // A HTTP channel for updating the offline cache should normally succeed.
 function normalHandler(metadata, response)
 {
   do_print("normalHandler");
--- a/netwerk/test/unit/test_cacheflags.js
+++ b/netwerk/test/unit/test_cacheflags.js
@@ -43,17 +43,17 @@ LoadContext.prototype = {
   },
 };
 
 var PrivateBrowsingLoadContext = new LoadContext(true);
 
 function make_channel(url, flags, usePrivateBrowsing) {
   var securityFlags = Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL;
 
-  var uri = Services.io.newURI(url, null, null);
+  var uri = Services.io.newURI(url);
   var principal = Services.scriptSecurityManager.createCodebasePrincipal(uri,
     { privateBrowsingId : usePrivateBrowsing ? 1 : 0 });
 
   var req = NetUtil.newChannel({uri: uri,
                                 loadingPrincipal: principal,
                                 securityFlags: securityFlags,
                                 contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER});
 
--- a/netwerk/test/unit/test_cookie_blacklist.js
+++ b/netwerk/test/unit/test_cookie_blacklist.js
@@ -1,15 +1,14 @@
 const GOOD_COOKIE = "GoodCookie=OMNOMNOM";
 const SPACEY_COOKIE = "Spacey Cookie=Major Tom";
 
 function run_test() {
   var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
-  var cookieURI = ios.newURI("http://mozilla.org/test_cookie_blacklist.js",
-                             null, null);
+  var cookieURI = ios.newURI("http://mozilla.org/test_cookie_blacklist.js");
 
   var cookieService = Cc["@mozilla.org/cookieService;1"]
                         .getService(Ci.nsICookieService);
   cookieService.setCookieStringFromHttp(cookieURI, cookieURI, null, "BadCookie1=\x01", null, null);
   cookieService.setCookieStringFromHttp(cookieURI, cookieURI, null, "BadCookie2=\v", null, null);
   cookieService.setCookieStringFromHttp(cookieURI, cookieURI, null, "Bad\x07Name=illegal", null, null);
   cookieService.setCookieStringFromHttp(cookieURI, cookieURI, null, GOOD_COOKIE, null, null);
   cookieService.setCookieStringFromHttp(cookieURI, cookieURI, null, SPACEY_COOKIE, null, null);
--- a/netwerk/test/unit/test_dns_proxy_bypass.js
+++ b/netwerk/test/unit/test_dns_proxy_bypass.js
@@ -65,13 +65,13 @@ function run_test() {
     createInstance(Components.interfaces.nsIWebSocketChannel);
 
   chan.initLoadInfo(null, // aLoadingNode
                     Services.scriptSecurityManager.getSystemPrincipal(),
                     null, // aTriggeringPrincipal
                     Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
                     Ci.nsIContentPolicy.TYPE_WEBSOCKET);
 
-  var uri = ioService.newURI(url, null, null);
+  var uri = ioService.newURI(url);
   chan.asyncOpen(uri, url, 0, listener, null);
   do_test_pending();
 }
 
--- a/netwerk/test/unit/test_fallback_no-cache-entry_canceled.js
+++ b/netwerk/test/unit/test_fallback_no-cache-entry_canceled.js
@@ -15,17 +15,17 @@ var cacheUpdateObserver = null;
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 var responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_fallback_no-cache-entry_passing.js
+++ b/netwerk/test/unit/test_fallback_no-cache-entry_passing.js
@@ -14,17 +14,17 @@ var cacheUpdateObserver = null;
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 var responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_fallback_redirect-to-different-origin_canceled.js
+++ b/netwerk/test/unit/test_fallback_redirect-to-different-origin_canceled.js
@@ -14,17 +14,17 @@ var cacheUpdateObserver = null;
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 const responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_fallback_redirect-to-different-origin_passing.js
+++ b/netwerk/test/unit/test_fallback_redirect-to-different-origin_passing.js
@@ -14,17 +14,17 @@ var cacheUpdateObserver = null;
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 var responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_fallback_request-error_canceled.js
+++ b/netwerk/test/unit/test_fallback_request-error_canceled.js
@@ -14,17 +14,17 @@ var cacheUpdateObserver = null;
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 var responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_fallback_request-error_passing.js
+++ b/netwerk/test/unit/test_fallback_request-error_passing.js
@@ -15,17 +15,17 @@ var systemPrincipal = Services.scriptSec
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 var responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_fallback_response-error_canceled.js
+++ b/netwerk/test/unit/test_fallback_response-error_canceled.js
@@ -16,17 +16,17 @@ var systemPrincipal = Services.scriptSec
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 var responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_fallback_response-error_passing.js
+++ b/netwerk/test/unit/test_fallback_response-error_passing.js
@@ -15,17 +15,17 @@ var systemPrincipal = Services.scriptSec
 
 function make_channel(url, callback, ctx) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 var responseBody = "Content body";
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
--- a/netwerk/test/unit/test_header_Accept-Language_case.js
+++ b/netwerk/test/unit/test_header_Accept-Language_case.js
@@ -32,16 +32,16 @@ function run_test() {
     let acceptLangHeader = setupChannel(testpath).getRequestHeader("Accept-Language");
     equal(acceptLangHeader, expectedHeader);
   }
 
   intlPrefs.setCharPref("accept_languages", oldAcceptLangPref);
 }
 
 function setupChannel(path) {
-  let uri = NetUtil.newURI("http://localhost:4444" + path, "", null);
+  let uri = NetUtil.newURI("http://localhost:4444" + path, "");
   let chan = NetUtil.newChannel({
     uri: uri,
     loadUsingSystemPrincipal: true
   });
   chan.QueryInterface(Ci.nsIHttpChannel);
   return chan;
 }
--- a/netwerk/test/unit/test_httpcancel.js
+++ b/netwerk/test/unit/test_httpcancel.js
@@ -21,17 +21,17 @@ var observer = {
     subject = subject.QueryInterface(Components.interfaces.nsIRequest);
     subject.cancel(Components.results.NS_BINDING_ABORTED);
 
     // ENSURE_CALLED_BEFORE_CONNECT: setting values should still work
     try {
       subject.QueryInterface(Components.interfaces.nsIHttpChannel);
       currentReferrer = subject.getRequestHeader("Referer");
       do_check_eq(currentReferrer, "http://site1.com/");
-      var uri = ios.newURI("http://site2.com", null, null);
+      var uri = ios.newURI("http://site2.com");
       subject.referrer = uri;
     } catch (ex) {
       do_throw("Exception: " + ex);
     }
 
     var obs = Components.classes["@mozilla.org/observer-service;1"].getService();
     obs = obs.QueryInterface(Components.interfaces.nsIObserverService);
     obs.removeObserver(observer, "http-on-modify-request");
@@ -42,17 +42,17 @@ var listener = {
   onStartRequest: function test_onStartR(request, ctx) {
     do_check_eq(request.status, Components.results.NS_BINDING_ABORTED);
 
     // ENSURE_CALLED_BEFORE_CONNECT: setting referrer should now fail
     try {
       request.QueryInterface(Components.interfaces.nsIHttpChannel);
       currentReferrer = request.getRequestHeader("Referer");
       do_check_eq(currentReferrer, "http://site2.com/");
-      var uri = ios.newURI("http://site3.com/", null, null);
+      var uri = ios.newURI("http://site3.com/");
 
       // Need to set NECKO_ERRORS_ARE_FATAL=0 else we'll abort process
       var env = Components.classes["@mozilla.org/process/environment;1"].
                   getService(Components.interfaces.nsIEnvironment);
       env.set("NECKO_ERRORS_ARE_FATAL", "0");
       // we expect setting referrer to fail
       try {
         request.referrer = uri;
@@ -72,17 +72,17 @@ var listener = {
   }
 };
 
 function makeChan(url) {
   var chan = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true})
                     .QueryInterface(Components.interfaces.nsIHttpChannel);
 
   // ENSURE_CALLED_BEFORE_CONNECT: set original value
-  var uri = ios.newURI("http://site1.com", null, null);
+  var uri = ios.newURI("http://site1.com");
   chan.referrer = uri;
 
   return chan;
 }
 
 var httpserv = null;
 
 function execute_test() {
--- a/netwerk/test/unit/test_nestedabout_serialize.js
+++ b/netwerk/test/unit/test_nestedabout_serialize.js
@@ -9,17 +9,17 @@ const Pipe =
   Components.Constructor("@mozilla.org/pipe;1", "nsIPipe", "init");
 
 const kNestedAboutCID = "{2f277c00-0eaf-4ddb-b936-41326ba48aae}";
 
 function run_test()
 {
   var ios = Cc["@mozilla.org/network/io-service;1"].createInstance(Ci.nsIIOService);
 
-  var baseURI = ios.newURI("http://example.com/", "UTF-8", null);
+  var baseURI = ios.newURI("http://example.com/", "UTF-8");
 
   // This depends on the redirector for about:license having the
   // nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT flag.
   var aboutLicense = ios.newURI("about:license", "UTF-8", baseURI);
 
   var pipe = new Pipe(false, false, 0, 0, null);
   var output = new BinaryOutputStream(pipe.outputStream);
   var input = new BinaryInputStream(pipe.inputStream);
--- a/netwerk/test/unit/test_offlinecache_custom-directory.js
+++ b/netwerk/test/unit/test_offlinecache_custom-directory.js
@@ -23,17 +23,17 @@ function make_channel(url, callback, ctx
     uri: url,
     loadUsingSystemPrincipal: true
   });
 }
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 // start the test with loading this master entry referencing the manifest
 function masterEntryHandler(metadata, response)
 {
   var masterEntryContent = "<html manifest='/manifest'></html>";
   response.setHeader("Content-Type", "text/html");
   response.bodyOutputStream.write(masterEntryContent, masterEntryContent.length);
--- a/netwerk/test/unit/test_permmgr.js
+++ b/netwerk/test/unit/test_permmgr.js
@@ -40,25 +40,25 @@ function run_test() {
                          .getService(Components.interfaces.nsIScriptSecurityManager);
 
   // nsIPermissionManager implementation is an extension; don't fail if it's not there
   if (!pm)
     return;
 
   // put a few hosts in
   for (var i = 0; i < hosts.length; ++i) {
-    let uri = ioService.newURI(hosts[i][0], null, null);
+    let uri = ioService.newURI(hosts[i][0]);
     let principal = secMan.createCodebasePrincipal(uri, {});
 
     pm.addFromPrincipal(principal, hosts[i][1], hosts[i][2]);
   }
 
   // test the result
   for (var i = 0; i < results.length; ++i) {
-    let uri = ioService.newURI(results[i][0], null, null);
+    let uri = ioService.newURI(results[i][0]);
     let principal = secMan.createCodebasePrincipal(uri, {});
 
     do_check_eq(pm.testPermissionFromPrincipal(principal, results[i][1]), results[i][2]);
     do_check_eq(pm.testExactPermissionFromPrincipal(principal, results[i][1]), results[i][3]);
   }
 
   // test the enumerator ...
   var j = 0;
@@ -73,45 +73,45 @@ function run_test() {
   // ... remove all the hosts ...
   for (var j = 0; j < perms.length; ++j) {
     pm.removePermission(perms[j]);
   }
   
   // ... ensure each and every element is equal ...
   for (var i = 0; i < hosts.length; ++i) {
     for (var j = 0; j < perms.length; ++j) {
-      if (perms[j].matchesURI(ioService.newURI(hosts[i][0], null, null), true) &&
+      if (perms[j].matchesURI(ioService.newURI(hosts[i][0]), true) &&
           hosts[i][1] == perms[j].type &&
           hosts[i][2] == perms[j].capability) {
         perms.splice(j, 1);
         break;
       }
     }
   }
   do_check_eq(perms.length, 0);
 
   // ... and check the permmgr's empty
   do_check_eq(pm.enumerator.hasMoreElements(), false);
 
   // test UTF8 normalization behavior: expect ASCII/ACE host encodings
   var utf8 = "b\u00FCcher.dolske.org"; // "bücher.dolske.org"
   var aceref = "xn--bcher-kva.dolske.org";
-  var uri = ioService.newURI("http://" + utf8, null, null);
+  var uri = ioService.newURI("http://" + utf8);
   pm.add(uri, "utf8", 1);
   var enumerator = pm.enumerator;
   do_check_eq(enumerator.hasMoreElements(), true);
   var ace = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission);
   do_check_eq(ace.principal.URI.asciiHost, aceref);
   do_check_eq(enumerator.hasMoreElements(), false);
 
   // test removeAll()
   pm.removeAll();
   do_check_eq(pm.enumerator.hasMoreElements(), false);
 
-  uri = ioService.newURI("https://www.example.com", null, null);
+  uri = ioService.newURI("https://www.example.com");
   pm.add(uri, "offline-app", pm.ALLOW_ACTION);
   principal = secMan.createCodebasePrincipalFromOrigin("https://www.example.com");
   // Remove existing entry.
   perm = pm.getPermissionObject(principal, "offline-app", true);
   pm.removePermission(perm);
   // Try to remove already deleted entry.
   perm = pm.getPermissionObject(principal, "offline-app", true);
   pm.removePermission(perm);
--- a/netwerk/test/unit/test_pinned_app_cache.js
+++ b/netwerk/test/unit/test_pinned_app_cache.js
@@ -162,18 +162,18 @@ function watch_update(update, stateChang
 
 function start_and_watch_app_cache(manifestURL,
                                  pageURL,
                                  pinned,
                                  stateChangeHandler,
                                  cacheAvailHandler) {
   let ioService = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService);
-  let update = do_app_cache(ioService.newURI(manifestURL, null, null),
-                            ioService.newURI(pageURL, null, null),
+  let update = do_app_cache(ioService.newURI(manifestURL),
+                            ioService.newURI(pageURL),
                             pinned);
   watch_update(update, stateChangeHandler, cacheAvailHandler);
   return update;
 }
 
 const {STATE_FINISHED: STATE_FINISHED,
        STATE_CHECKING: STATE_CHECKING,
        STATE_ERROR: STATE_ERROR } = Ci.nsIOfflineCacheUpdateObserver;
--- a/netwerk/test/unit/test_predictor.js
+++ b/netwerk/test/unit/test_predictor.js
@@ -159,17 +159,17 @@ function reset_predictor() {
   if (running_single_process || is_child_process()) {
     predictor.reset();
   } else {
     sendCommand("predictor.reset();");
   }
 }
 
 function newURI(s) {
-  return Services.io.newURI(s, null, null);
+  return Services.io.newURI(s);
 }
 
 var prepListener = {
   numEntriesToOpen: 0,
   numEntriesOpened: 0,
   continueCallback: null,
 
   QueryInterface: function (iid) {
--- a/netwerk/test/unit/test_protocolproxyservice.js
+++ b/netwerk/test/unit/test_protocolproxyservice.js
@@ -261,61 +261,61 @@ function filter_test0_5(pi)
   check_proxy(pi, "http", "www.mozilla.org", 7777, 0, 10, true);
   check_proxy(pi.failoverProxy, "direct", "", -1, 0, 0, false);
   run_filter_test_uri();
 }
 
 function run_filter_test_uri() {
   var cb = new resolveCallback();
   cb.nextFunction = filter_test_uri0_1;
-  var uri = ios.newURI("http://www.mozilla.org/", null, null);
+  var uri = ios.newURI("http://www.mozilla.org/");
   pps.asyncResolve(uri, 0, cb);
 }
 
 function filter_test_uri0_1(pi) {
   do_check_eq(pi, null);
 
   // Push a filter and verify the results
 
   filter01 = new BasicFilter();
   filter02 = new BasicFilter();
   pps.registerFilter(filter01, 10);
   pps.registerFilter(filter02, 20);
 
   var cb = new resolveCallback();
   cb.nextFunction = filter_test_uri0_2;
-  var uri = ios.newURI("http://www.mozilla.org/", null, null);
+  var uri = ios.newURI("http://www.mozilla.org/");
   pps.asyncResolve(uri, 0, cb);
 }
 
 function filter_test_uri0_2(pi)
 {
   check_proxy(pi, "http", "localhost", 8080, 0, 10, true);
   check_proxy(pi.failoverProxy, "direct", "", -1, 0, 0, false);
 
   pps.unregisterFilter(filter02);
 
   var cb = new resolveCallback();
   cb.nextFunction = filter_test_uri0_3;
-  var uri = ios.newURI("http://www.mozilla.org/", null, null);
+  var uri = ios.newURI("http://www.mozilla.org/");
   pps.asyncResolve(uri, 0, cb);
 }
 
 function filter_test_uri0_3(pi)
 {
   check_proxy(pi, "http", "localhost", 8080, 0, 10, true);
   check_proxy(pi.failoverProxy, "direct", "", -1, 0, 0, false);
 
   // Remove filter and verify that we return to the initial state
 
   pps.unregisterFilter(filter01);
 
   var cb = new resolveCallback();
   cb.nextFunction = filter_test_uri0_4;
-  var uri = ios.newURI("http://www.mozilla.org/", null, null);
+  var uri = ios.newURI("http://www.mozilla.org/");
   pps.asyncResolve(uri, 0, cb);
 }
 
 function filter_test_uri0_4(pi)
 {
   do_check_eq(pi, null);
   run_filter_test2();
 }
--- a/netwerk/test/unit/test_redirect_from_script.js
+++ b/netwerk/test/unit/test_redirect_from_script.js
@@ -148,17 +148,17 @@ Redirector.prototype = {
       var ioservice = Cc["@mozilla.org/network/io-service;1"].
                         getService(Ci.nsIIOService);
       var target = null;
       if (channel.URI.spec == baitURI)  target = redirectedURI;
       if (channel.URI.spec == bait2URI) target = redirected2URI;
       if (channel.URI.spec == bait4URI) target = baitURI;
        // if we have a target, redirect there
       if (target) {
-        var tURI = ioservice.newURI(target, null, null);
+        var tURI = ioservice.newURI(target);
         try {
           channel.redirectTo(tURI);
         } catch (e) {
           do_throw("Exception in redirectTo " + e + "\n");
         }
       }
     }
   }
--- a/netwerk/test/unit/test_redirect_from_script_after-open_passing.js
+++ b/netwerk/test/unit/test_redirect_from_script_after-open_passing.js
@@ -148,17 +148,17 @@ Redirector.prototype = {
       var ioservice = Cc["@mozilla.org/network/io-service;1"].
                         getService(Ci.nsIIOService);
       var target = null;
       if (channel.URI.spec == baitURI)  target = redirectedURI;
       if (channel.URI.spec == bait2URI) target = redirected2URI;
       if (channel.URI.spec == bait4URI) target = baitURI;
        // if we have a target, redirect there
       if (target) {
-        var tURI = ioservice.newURI(target, null, null);
+        var tURI = ioservice.newURI(target);
         try {
           channel.redirectTo(tURI);
         } catch (e) {
           do_throw("Exception in redirectTo " + e + "\n");
         }
       }
     }
   }
--- a/netwerk/test/unit/test_referrer.js
+++ b/netwerk/test/unit/test_referrer.js
@@ -1,14 +1,14 @@
 Cu.import("resource://gre/modules/NetUtil.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 function getTestReferrer(server_uri, referer_uri) {
-  var uri = NetUtil.newURI(server_uri, "", null)
-  let referrer = NetUtil.newURI(referer_uri, null, null);
+  var uri = NetUtil.newURI(server_uri, "")
+  let referrer = NetUtil.newURI(referer_uri);
   let triggeringPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(referrer, {});
   var chan = NetUtil.newChannel({
     uri: uri,
     loadingPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
     triggeringPrincipal: triggeringPrincipal,
     contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER
   });
 
--- a/netwerk/test/unit/test_referrer_policy.js
+++ b/netwerk/test/unit/test_referrer_policy.js
@@ -7,23 +7,23 @@ function test_policy(test) {
     .getService(Components.interfaces.nsIPrefBranch);
   if (test.defaultReferrerPolicyPref !== undefined) {
     prefs.setIntPref("network.http.referer.userControlPolicy",
                      test.defaultReferrerPolicyPref);
   } else {
     prefs.setIntPref("network.http.referer.userControlPolicy", 3);
   }
 
-  var uri = NetUtil.newURI(test.url, "", null)
+  var uri = NetUtil.newURI(test.url, "")
   var chan = NetUtil.newChannel({
     uri: uri,
     loadUsingSystemPrincipal: true
   });
 
-  var referrer = NetUtil.newURI(test.referrer, "", null);
+  var referrer = NetUtil.newURI(test.referrer, "");
   chan.QueryInterface(Components.interfaces.nsIHttpChannel);
   chan.setReferrerWithPolicy(referrer, test.policy);
   if (test.expectedReferrerSpec === undefined) {
     try {
       chan.getRequestHeader("Referer");
       do_throw("Should not find a Referer header!");
     } catch(e) {
     }
--- a/netwerk/test/unit/test_speculative_connect.js
+++ b/netwerk/test/unit/test_speculative_connect.js
@@ -138,17 +138,17 @@ TestFailedStreamCallback.prototype = {
 
 /** test_speculative_connect
  *
  * Tests a basic positive case using nsIOService.SpeculativeConnect:
  * connecting to localhost.
  */
 function test_speculative_connect() {
     serv = new TestServer();
-    var URI = ios.newURI("http://localhost:" + serv.listener.port + "/just/a/test", null, null);
+    var URI = ios.newURI("http://localhost:" + serv.listener.port + "/just/a/test");
     ios.QueryInterface(Ci.nsISpeculativeConnect)
         .speculativeConnect(URI, null);
 }
 
 /* Speculative connections should not be allowed for hosts with local IP
  * addresses (Bug 853423). That list includes:
  *  -- IPv4 RFC1918 and Link Local Addresses.
  *  -- IPv6 Unique and Link Local Addresses.
--- a/netwerk/test/unit/test_standardurl_port.js
+++ b/netwerk/test/unit/test_standardurl_port.js
@@ -1,16 +1,16 @@
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
 function run_test() {
   function makeURI(aURLSpec, aCharset) {
     var ios = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
-    return ios.newURI(aURLSpec, aCharset, null);
+    return ios.newURI(aURLSpec, aCharset);
   }
 
   var httpURI = makeURI("http://foo.com");
   do_check_eq(-1, httpURI.port);
 
   // Setting to default shouldn't cause a change
   httpURI.port = 80;
   do_check_eq(-1, httpURI.port);
--- a/netwerk/test/unit/test_synthesized_response.js
+++ b/netwerk/test/unit/test_synthesized_response.js
@@ -9,17 +9,17 @@ XPCOMUtils.defineLazyGetter(this, "URL",
   return "http://localhost:" + httpServer.identity.primaryPort;
 });
 
 var httpServer = null;
 
 function make_uri(url) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 // ensure the cache service is prepped when running the test
 Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
 
 var gotOnProgress;
 var gotOnStatus;
 
--- a/netwerk/test/unit/test_websocket_offline.js
+++ b/netwerk/test/unit/test_websocket_offline.js
@@ -36,16 +36,16 @@ function run_test() {
     chan = Cc["@mozilla.org/network/protocol;1?name=ws"].
       createInstance(Components.interfaces.nsIWebSocketChannel);
     chan.initLoadInfo(null, // aLoadingNode
                       Services.scriptSecurityManager.getSystemPrincipal(),
                       null, // aTriggeringPrincipal
                       Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
                       Ci.nsIContentPolicy.TYPE_WEBSOCKET);
 
-    var uri = Services.io.newURI(url, null, null);
+    var uri = Services.io.newURI(url);
     chan.asyncOpen(uri, url, 0, listener, null);
     do_test_pending();
   } catch (x) {
     dump("throwing " + x);
     do_throw(x);
   }
 }
--- a/security/manager/ssl/tests/mochitest/browser/browser_bug627234_perwindowpb.js
+++ b/security/manager/ssl/tests/mochitest/browser/browser_bug627234_perwindowpb.js
@@ -48,17 +48,17 @@ function test() {
   function privacyFlags(aIsPrivateMode) {
     return aIsPrivateMode ? Ci.nsISocketProvider.NO_PERMANENT_STORAGE : 0;
   }
 
   function doTest(aIsPrivateMode, aWindow, aCallback) {
     aWindow.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
       aWindow.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
       let sslStatus = new FakeSSLStatus();
-      uri = aWindow.Services.io.newURI("https://localhost/img.png", null, null);
+      uri = aWindow.Services.io.newURI("https://localhost/img.png");
       gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                                "max-age=1000", sslStatus, privacyFlags(aIsPrivateMode));
       ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS, "localhost", privacyFlags(aIsPrivateMode)), "checking sts host");
 
       aCallback();
     }, true);
 
     aWindow.gBrowser.selectedBrowser.loadURI(testURI);
@@ -74,17 +74,17 @@ function test() {
     });
   }
 
    // this function is called after calling finish() on the test.
   registerCleanupFunction(function() {
     windowsToClose.forEach(function(aWin) {
       aWin.close();
     });
-    uri = Services.io.newURI("http://localhost", null, null);
+    uri = Services.io.newURI("http://localhost");
     gSSService.removeState(Ci.nsISiteSecurityService.HEADER_HSTS, uri, 0);
   });
 
   // test first when on private mode
   testOnWindow({private: true}, function(aWin) {
     doTest(true, aWin, function() {
       //test when not on private mode
       testOnWindow({}, function(aWin) {
--- a/security/manager/ssl/tests/unit/test_cert_overrides.js
+++ b/security/manager/ssl/tests/unit/test_cert_overrides.js
@@ -256,17 +256,17 @@ function add_simple_tests() {
   add_cert_override_test("bug413909.xn--hxajbheg2az3al.xn--jxalpdlp",
                          Ci.nsICertOverrideService.ERROR_UNTRUSTED,
                          SEC_ERROR_UNKNOWN_ISSUER);
   add_test(function() {
     // At this point, the override for bug413909.xn--hxajbheg2az3al.xn--jxalpdlp
     // is still valid. Do some additional tests relating to IDN handling.
     let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
                                 .getService(Ci.nsICertOverrideService);
-    let uri = Services.io.newURI("https://bug413909.xn--hxajbheg2az3al.xn--jxalpdlp", null, null);
+    let uri = Services.io.newURI("https://bug413909.xn--hxajbheg2az3al.xn--jxalpdlp");
     let cert = constructCertFromFile("bad_certs/idn-certificate.pem");
     Assert.ok(certOverrideService.hasMatchingOverride(uri.asciiHost, 8443, cert, {}, {}),
               "IDN certificate should have matching override using ascii host");
     Assert.ok(!certOverrideService.hasMatchingOverride(uri.host, 8443, cert, {}, {}),
               "IDN certificate should not have matching override using (non-ascii) host");
     run_next_test();
   });
 }
--- a/security/manager/ssl/tests/unit/test_forget_about_site_security_headers.js
+++ b/security/manager/ssl/tests/unit/test_forget_about_site_security_headers.js
@@ -31,17 +31,17 @@ Services.prefs.setBoolPref(
   "security.cert_pinning.process_headers_from_non_builtin_roots", true);
 
 var certdb = Cc["@mozilla.org/security/x509certdb;1"]
                .getService(Ci.nsIX509CertDB);
 addCertFromFile(certdb, "test_pinning_dynamic/pinningroot.pem", "CTu,CTu,CTu");
 
 var sss = Cc["@mozilla.org/ssservice;1"]
             .getService(Ci.nsISiteSecurityService);
-var uri = Services.io.newURI("https://a.pinning2.example.com", null, null);
+var uri = Services.io.newURI("https://a.pinning2.example.com");
 
 // This test re-uses certificates from pinning tests because that's easier and
 // simpler than recreating new certificates, hence the slightly longer than
 // necessary domain name.
 var sslStatus = new FakeSSLStatus(constructCertFromFile(
   "test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem"));
 
 // Test the normal case of processing HSTS and HPKP headers for
--- a/security/manager/ssl/tests/unit/test_ocsp_must_staple.js
+++ b/security/manager/ssl/tests/unit/test_ocsp_must_staple.js
@@ -25,18 +25,17 @@ function add_tests() {
   // ensure that the chain is checked for required features in children:
   // First a case where intermediate and ee both have the extension
   add_ocsp_test("ocsp-stapling-must-staple-ee-with-must-staple-int.example.com",
                 PRErrorCodeSuccess, true);
 
   add_test(() => {
     Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 1);
     Services.prefs.setBoolPref("security.cert_pinning.process_headers_from_non_builtin_roots", true);
-    let uri = Services.io.newURI("https://ocsp-stapling-must-staple-ee-with-must-staple-int.example.com",
-                                 null, null);
+    let uri = Services.io.newURI("https://ocsp-stapling-must-staple-ee-with-must-staple-int.example.com");
     let keyHash = "VCIlmPM9NkgFQtrs4Oa5TeFcDu6MWRTKSNdePEhOgD8=";
     let backupKeyHash = "KHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN=";
     let header = `max-age=1000; pin-sha256="${keyHash}"; pin-sha256="${backupKeyHash}"`;
     let ssservice = Cc["@mozilla.org/ssservice;1"]
                       .getService(Ci.nsISiteSecurityService);
     let sslStatus = new FakeSSLStatus();
     sslStatus.serverCert = constructCertFromFile("ocsp_certs/must-staple-ee-with-must-staple-int.pem");
     ssservice.processHeader(Ci.nsISiteSecurityService.HEADER_HPKP, uri, header, sslStatus, 0);
--- a/security/manager/ssl/tests/unit/test_ocsp_no_hsts_upgrade.js
+++ b/security/manager/ssl/tests/unit/test_ocsp_no_hsts_upgrade.js
@@ -36,17 +36,17 @@ function run_test() {
   // test demonstrates that our implementation is correct in this regard.
   add_connection_test("ocsp-stapling-none.example.com", PRErrorCodeSuccess);
   add_test(function () { run_next_test(); });
 
   add_test(function () { ocspResponder.stop(run_next_test); });
 
   let SSService = Cc["@mozilla.org/ssservice;1"]
                     .getService(Ci.nsISiteSecurityService);
-  let uri = Services.io.newURI("http://localhost", null, null);
+  let uri = Services.io.newURI("http://localhost");
   let sslStatus = new FakeSSLStatus();
   SSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                           "max-age=10000", sslStatus, 0);
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "localhost", 0),
      "Domain for the OCSP AIA URI should be considered a HSTS host, otherwise" +
      " we wouldn't be testing what we think we're testing");
 
--- a/security/manager/ssl/tests/unit/test_pinning_header_parsing.js
+++ b/security/manager/ssl/tests/unit/test_pinning_header_parsing.js
@@ -20,27 +20,27 @@ function loadCert(cert_name, trust_strin
   let cert_filename = "test_pinning_dynamic/" + cert_name + ".pem";
   addCertFromFile(certdb, cert_filename, trust_string);
   return constructCertFromFile(cert_filename);
 }
 
 function checkFailParseInvalidPin(pinValue) {
   let sslStatus = new FakeSSLStatus(
                         certFromFile("a.pinning2.example.com-pinningroot"));
-  let uri = Services.io.newURI("https://a.pinning2.example.com", null, null);
+  let uri = Services.io.newURI("https://a.pinning2.example.com");
   throws(() => {
     gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HPKP, uri,
                              pinValue, sslStatus, 0);
   }, /NS_ERROR_FAILURE/, `Invalid pin "${pinValue}" should be rejected`);
 }
 
 function checkPassValidPin(pinValue, settingPin, expectedMaxAge) {
   let sslStatus = new FakeSSLStatus(
                         certFromFile("a.pinning2.example.com-pinningroot"));
-  let uri = Services.io.newURI("https://a.pinning2.example.com", null, null);
+  let uri = Services.io.newURI("https://a.pinning2.example.com");
   let maxAge = {};
 
   // setup preconditions for the test, if setting ensure there is no previous
   // state, if removing ensure there is a valid pin in place.
   if (settingPin) {
     gSSService.removeState(Ci.nsISiteSecurityService.HEADER_HPKP, uri, 0);
   } else {
     // add a known valid pin!
--- a/security/manager/ssl/tests/unit/test_sss_eviction.js
+++ b/security/manager/ssl/tests/unit/test_sss_eviction.js
@@ -50,17 +50,17 @@ function do_state_read(aSubject, aTopic,
   }
 
   equal(aData, SSS_STATE_FILE_NAME);
 
   ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "frequentlyused.example.com", 0));
   let sslStatus = new FakeSSLStatus();
   for (let i = 0; i < 2000; i++) {
-    let uri = Services.io.newURI("http://bad" + i + ".example.com", null, null);
+    let uri = Services.io.newURI("http://bad" + i + ".example.com");
     gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                             "max-age=1000", sslStatus, 0);
   }
   do_test_pending();
   Services.obs.addObserver(do_state_written, "data-storage-written", false);
   do_test_finished();
 }
 
--- a/security/manager/ssl/tests/unit/test_sss_savestate.js
+++ b/security/manager/ssl/tests/unit/test_sss_savestate.js
@@ -100,21 +100,21 @@ function run_test() {
   gProfileDir = do_get_profile();
   let SSService = Cc["@mozilla.org/ssservice;1"]
                     .getService(Ci.nsISiteSecurityService);
   // Put an HPKP entry
   SSService.setKeyPins("dynamic-pin.example.com", true,
                        new Date().getTime() + 1000000, 1,
                        [NON_ISSUED_KEY_HASH]);
 
-  let uris = [ Services.io.newURI("http://bugzilla.mozilla.org", null, null),
-               Services.io.newURI("http://a.example.com", null, null),
-               Services.io.newURI("http://b.example.com", null, null),
-               Services.io.newURI("http://c.c.example.com", null, null),
-               Services.io.newURI("http://d.example.com", null, null) ];
+  let uris = [ Services.io.newURI("http://bugzilla.mozilla.org"),
+               Services.io.newURI("http://a.example.com"),
+               Services.io.newURI("http://b.example.com"),
+               Services.io.newURI("http://c.c.example.com"),
+               Services.io.newURI("http://d.example.com") ];
 
   for (let i = 0; i < 1000; i++) {
     let uriIndex = i % uris.length;
     // vary max-age
     let maxAge = "max-age=" + (i * 1000);
      // alternate setting includeSubdomains
     let includeSubdomains = (i % 2 == 0 ? "; includeSubdomains" : "");
     let sslStatus = new FakeSSLStatus();
--- a/security/manager/ssl/tests/unit/test_sts_fqdn.js
+++ b/security/manager/ssl/tests/unit/test_sts_fqdn.js
@@ -10,41 +10,41 @@ function run_test() {
   ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "example.com", 0));
   ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "example.com.", 0));
   // These cases are only relevant as long as bug 1118522 hasn't been fixed.
   ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "example.com..", 0));
 
-  let uri = Services.io.newURI("https://example.com", null, null);
+  let uri = Services.io.newURI("https://example.com");
   let sslStatus = new FakeSSLStatus();
   SSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                           "max-age=1000;includeSubdomains", sslStatus, 0);
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "example.com", 0));
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "example.com.", 0));
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "example.com..", 0));
 
   ok(SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, uri, 0));
-  uri = Services.io.newURI("https://example.com.", null, null);
+  uri = Services.io.newURI("https://example.com.");
   ok(SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, uri, 0));
-  uri = Services.io.newURI("https://example.com..", null, null);
+  uri = Services.io.newURI("https://example.com..");
   ok(SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, uri, 0));
 
   SSService.removeState(Ci.nsISiteSecurityService.HEADER_HSTS, uri, 0);
   ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "example.com", 0));
   ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "example.com.", 0));
   ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "example.com..", 0));
 
   // Somehow creating this malformed URI succeeds - we need to handle it
   // gracefully.
-  uri = Services.io.newURI("https://../foo", null, null);
+  uri = Services.io.newURI("https://../foo");
   equal(uri.host, "..");
   throws(() => {
     SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, uri, 0);
   }, /NS_ERROR_UNEXPECTED/, "Malformed URI should be rejected");
 }
--- a/security/manager/ssl/tests/unit/test_sts_holepunch.js
+++ b/security/manager/ssl/tests/unit/test_sts_holepunch.js
@@ -22,13 +22,13 @@ function run_test() {
                             "example.apis.google.com", 0));
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "EXAMPLE.APIS.GOOGLE.COM", 0));
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "sub.example.apis.google.com", 0));
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "SUB.EXAMPLE.APIS.GOOGLE.COM", 0));
   // also check isSecureURI
-  let chartURI = Services.io.newURI("http://chart.apis.google.com", null, null);
+  let chartURI = Services.io.newURI("http://chart.apis.google.com");
   ok(!SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, chartURI, 0));
-  let otherURI = Services.io.newURI("http://other.apis.google.com", null, null);
+  let otherURI = Services.io.newURI("http://other.apis.google.com");
   ok(SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, otherURI, 0));
 }
--- a/security/manager/ssl/tests/unit/test_sts_ipv4_ipv6.js
+++ b/security/manager/ssl/tests/unit/test_sts_ipv4_ipv6.js
@@ -9,17 +9,17 @@ function check_ip(s, v, ip) {
     str += "[";
   }
   str += ip;
   if (v == 6) {
     str += "]";
   }
   str += "/";
 
-  let uri = Services.io.newURI(str, null, null);
+  let uri = Services.io.newURI(str);
 
   let parsedMaxAge = {};
   let parsedIncludeSubdomains = {};
   s.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                   "max-age=1000;includeSubdomains", sslStatus, 0,
                   parsedMaxAge, parsedIncludeSubdomains);
 
   /* Test that processHeader will ignore headers for an uri, if the uri
--- a/security/manager/ssl/tests/unit/test_sts_preload_dynamic.js
+++ b/security/manager/ssl/tests/unit/test_sts_preload_dynamic.js
@@ -57,16 +57,16 @@ function run_test() {
                             unlikelyHost, 0));
 
   // check that it's now including subdomains
   ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                             "subdomain." + unlikelyHost, 0));
 
   // Now let's simulate overriding the entry by setting an entry from a header
   // with max-age set to 0
-  let uri = Services.io.newURI("https://" + unlikelyHost, null, null);
+  let uri = Services.io.newURI("https://" + unlikelyHost);
   SSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                           "max-age=0", sslStatus, 0);
 
   // this should no longer be an HSTS host
   ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              unlikelyHost, 0));
 }
--- a/security/manager/ssl/tests/unit/test_sts_preloadlist_perwindowpb.js
+++ b/security/manager/ssl/tests/unit/test_sts_preloadlist_perwindowpb.js
@@ -65,17 +65,17 @@ function test_part1() {
                               "subdomain.www.torproject.org", 0));
 
   // check that a host with a dot on the end won't break anything
   ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                               "notsts.nonexistent.mozilla.com.", 0));
 
   // check that processing a header with max-age: 0 will remove a preloaded
   // site from the list
-  let uri = Services.io.newURI("http://bugzilla.mozilla.org", null, null);
+  let uri = Services.io.newURI("http://bugzilla.mozilla.org");
   gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                            "max-age=0", sslStatus, 0);
   ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                               "bugzilla.mozilla.org", 0));
   ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                               "subdomain.bugzilla.mozilla.org", 0));
   // check that processing another header (with max-age non-zero) will
   // re-enable a site's sts status
@@ -85,25 +85,25 @@ function test_part1() {
                              "bugzilla.mozilla.org", 0));
   // but this time include subdomains was not set, so test for that
   ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                               "subdomain.bugzilla.mozilla.org", 0));
   gSSService.clearAll();
 
   // check that processing a header with max-age: 0 from a subdomain of a site
   // will not remove that (ancestor) site from the list
-  uri = Services.io.newURI("http://subdomain.www.torproject.org", null, null);
+  uri = Services.io.newURI("http://subdomain.www.torproject.org");
   gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                            "max-age=0", sslStatus, 0);
   ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "www.torproject.org", 0));
   ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                               "subdomain.www.torproject.org", 0));
 
-  uri = Services.io.newURI("http://subdomain.bugzilla.mozilla.org", null, null);
+  uri = Services.io.newURI("http://subdomain.bugzilla.mozilla.org");
   gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                            "max-age=0", sslStatus, 0);
   // we received a header with "max-age=0", so we have "no information"
   // regarding the sts state of subdomain.bugzilla.mozilla.org specifically,
   // but it is actually still an STS host, because of the preloaded
   // bugzilla.mozilla.org including subdomains.
   // Here's a drawing:
   // |-- bugzilla.mozilla.org (in preload list, includes subdomains) IS sts host
@@ -136,17 +136,17 @@ function test_part1() {
   // Test that an expired non-private browsing entry results in correctly
   // identifying a host that is on the preload list as no longer sts.
   // (This happens when we're in regular browsing mode, we get a header from
   // a site on the preload list, and that header later expires. We need to
   // then treat that host as no longer an sts host.)
   // (sanity check first - this should be in the preload list)
   ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "login.persona.org", 0));
-  uri = Services.io.newURI("http://login.persona.org", null, null);
+  uri = Services.io.newURI("http://login.persona.org");
   gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                            "max-age=1", sslStatus, 0);
   do_timeout(1250, function() {
     ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                                 "login.persona.org", 0));
     run_next_test();
   });
 }
@@ -156,17 +156,17 @@ const IS_PRIVATE = Ci.nsISocketProvider.
 function test_private_browsing1() {
   gSSService.clearAll();
   // sanity - bugzilla.mozilla.org is preloaded, includeSubdomains set
   ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "bugzilla.mozilla.org", IS_PRIVATE));
   ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "a.b.c.subdomain.bugzilla.mozilla.org", IS_PRIVATE));
 
-  let uri = Services.io.newURI("http://bugzilla.mozilla.org", null, null);
+  let uri = Services.io.newURI("http://bugzilla.mozilla.org");
   gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                            "max-age=0", sslStatus, IS_PRIVATE);
   ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                               "bugzilla.mozilla.org", IS_PRIVATE));
   ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                               "a.b.subdomain.bugzilla.mozilla.org", IS_PRIVATE));
 
   // check adding it back in
@@ -189,17 +189,17 @@ function test_private_browsing1() {
   // Test that an expired private browsing entry results in correctly
   // identifying a host that is on the preload list as no longer sts.
   // (This happens when we're in private browsing mode, we get a header from
   // a site on the preload list, and that header later expires. We need to
   // then treat that host as no longer an sts host.)
   // (sanity check first - this should be in the preload list)
   ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                              "login.persona.org", IS_PRIVATE));
-  uri = Services.io.newURI("http://login.persona.org", null, null);
+  uri = Services.io.newURI("http://login.persona.org");
   gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS, uri,
                            "max-age=1", sslStatus, IS_PRIVATE);
   do_timeout(1250, function() {
     ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
                                 "login.persona.org", IS_PRIVATE));
     // Simulate leaving private browsing mode
     Services.obs.notifyObservers(null, "last-pb-context-exited", null);
   });
--- a/security/manager/tools/getHSTSPreloadList.js
+++ b/security/manager/tools/getHSTSPreloadList.js
@@ -110,17 +110,17 @@ var gSSService = Cc["@mozilla.org/ssserv
                    .getService(Ci.nsISiteSecurityService);
 
 function processStsHeader(host, header, status, securityInfo) {
   var maxAge = { value: 0 };
   var includeSubdomains = { value: false };
   var error = ERROR_NONE;
   if (header != null && securityInfo != null) {
     try {
-      var uri = Services.io.newURI("https://" + host.name, null, null);
+      var uri = Services.io.newURI("https://" + host.name);
       var sslStatus = securityInfo.QueryInterface(Ci.nsISSLStatusProvider)
                                   .SSLStatus;
       gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS,
                                uri, header, sslStatus, 0, maxAge,
                                includeSubdomains);
     }
     catch (e) {
       dump("ERROR: could not process header '" + header + "' from " +
--- a/services/common/rest.js
+++ b/services/common/rest.js
@@ -78,17 +78,17 @@ const Prefs = new Preferences("services.
  *   request.get();
  */
 this.RESTRequest = function RESTRequest(uri) {
   this.status = this.NOT_SENT;
 
   // If we don't have an nsIURI object yet, make one. This will throw if
   // 'uri' isn't a valid URI string.
   if (!(uri instanceof Ci.nsIURI)) {
-    uri = Services.io.newURI(uri, null, null);
+    uri = Services.io.newURI(uri);
   }
   this.uri = uri;
 
   this._headers = {};
   this._log = Log.repository.getLogger(this._logName);
   this._log.level =
     Log.Level[Prefs.get("log.logger.rest.request")];
 }
--- a/services/common/tests/unit/head_global.js
+++ b/services/common/tests/unit/head_global.js
@@ -16,14 +16,13 @@ updateAppInfo({
 
 function addResourceAlias() {
   Cu.import("resource://gre/modules/Services.jsm");
   const handler = Services.io.getProtocolHandler("resource")
                   .QueryInterface(Ci.nsIResProtocolHandler);
 
   let modules = ["common", "crypto"];
   for (let module of modules) {
-    let uri = Services.io.newURI("resource://gre/modules/services-" + module + "/",
-                                 null, null);
+    let uri = Services.io.newURI("resource://gre/modules/services-" + module + "/");
     handler.setSubstitution("services-" + module, uri);
   }
 }
 addResourceAlias();
--- a/services/common/utils.js
+++ b/services/common/utils.js
@@ -90,17 +90,17 @@ this.CommonUtils = {
 
   /**
    * Create a nsIURI instance from a string.
    */
   makeURI: function makeURI(URIString) {
     if (!URIString)
       return null;
     try {
-      return Services.io.newURI(URIString, null, null);
+      return Services.io.newURI(URIString);
     } catch (e) {
       let log = Log.repository.getLogger("Common.Utils");
       log.debug("Could not create URI", e);
       return null;
     }
   },
 
   /**
--- a/services/crypto/tests/unit/head_helpers.js
+++ b/services/crypto/tests/unit/head_helpers.js
@@ -30,18 +30,17 @@ updateAppInfo({
 });
 }
 
 // Register resource alias. Normally done in SyncComponents.manifest.
 function addResourceAlias() {
   Cu.import("resource://gre/modules/Services.jsm");
   const resProt = Services.io.getProtocolHandler("resource")
                           .QueryInterface(Ci.nsIResProtocolHandler);
-  let uri = Services.io.newURI("resource://gre/modules/services-crypto/",
-                               null, null);
+  let uri = Services.io.newURI("resource://gre/modules/services-crypto/");
   resProt.setSubstitution("services-crypto", uri);
 }
 addResourceAlias();
 
 /**
  * Print some debug message to the console. All arguments will be printed,
  * separated by spaces.
  *
--- a/services/fxaccounts/FxAccountsOAuthClient.jsm
+++ b/services/fxaccounts/FxAccountsOAuthClient.jsm
@@ -145,17 +145,17 @@ this.FxAccountsOAuthClient.prototype = {
    *
    * @private
    */
   _configureChannel: function() {
     this._webChannelId = "oauth_" + this.parameters.client_id;
 
     // if this.parameters.content_uri is present but not a valid URI, then this will throw an error.
     try {
-      this._webChannelOrigin = Services.io.newURI(this.parameters.content_uri, null, null);
+      this._webChannelOrigin = Services.io.newURI(this.parameters.content_uri);
     } catch (e) {
       throw e;
     }
   },
 
   /**
    * Create a new channel with the WebChannelBroker, setup a callback listener
    * @private
--- a/services/fxaccounts/FxAccountsWebChannel.jsm
+++ b/services/fxaccounts/FxAccountsWebChannel.jsm
@@ -123,17 +123,17 @@ this.FxAccountsWebChannel.prototype = {
   /**
    * Configures and registers a new WebChannel
    *
    * @private
    */
   _setupChannel() {
     // if this.contentUri is present but not a valid URI, then this will throw an error.
     try {
-      this._webChannelOrigin = Services.io.newURI(this._contentUri, null, null);
+      this._webChannelOrigin = Services.io.newURI(this._contentUri);
       this._registerChannel();
     } catch (e) {
       log.error(e);
       throw e;
     }
   },
 
   _receiveMessage(message, sendingContext) {
--- a/services/sync/modules/browserid_identity.js
+++ b/services/sync/modules/browserid_identity.js
@@ -618,17 +618,17 @@ this.BrowserIDManager.prototype = {
       let kBbytes = CommonUtils.hexToBytes(userData.kB);
       let headers = {"X-Client-State": this._computeXClientState(kBbytes)};
       client.getTokenFromBrowserIDAssertion(tokenServerURI, assertion, cb, headers);
       return deferred.promise;
     }
 
     let getAssertion = () => {
       log.info("Getting an assertion from", tokenServerURI);
-      let audience = Services.io.newURI(tokenServerURI, null, null).prePath;
+      let audience = Services.io.newURI(tokenServerURI).prePath;
       return fxa.getAssertion(audience);
     };
 
     // wait until the account email is verified and we know that
     // getAssertion() will return a real assertion (not null).
     return fxa.whenVerified(this._signedInUser)
       .then(() => maybeFetchKeys())
       .then(() => getAssertion())
--- a/services/sync/tests/unit/head_appinfo.js
+++ b/services/sync/tests/unit/head_appinfo.js
@@ -44,14 +44,13 @@ updateAppInfo({
   OS: getOS(),
 });
 
 // Register resource aliases. Normally done in SyncComponents.manifest.
 function addResourceAlias() {
   const resProt = Services.io.getProtocolHandler("resource")
                           .QueryInterface(Ci.nsIResProtocolHandler);
   for (let s of ["common", "sync", "crypto"]) {
-    let uri = Services.io.newURI("resource://gre/modules/services-" + s + "/", null,
-                                 null);
+    let uri = Services.io.newURI("resource://gre/modules/services-" + s + "/");
     resProt.setSubstitution("services-" + s, uri);
   }
 }
 addResourceAlias();
--- a/services/sync/tests/unit/test_addon_utils.js
+++ b/services/sync/tests/unit/test_addon_utils.js
@@ -75,25 +75,25 @@ add_test(function test_ignore_untrusted_
 
   const bad = ["http://example.com/foo.xpi",
                "ftp://example.com/foo.xpi",
                "silly://example.com/foo.xpi"];
 
   const good = ["https://example.com/foo.xpi"];
 
   for (let s of bad) {
-    let sourceURI = ioService.newURI(s, null, null);
+    let sourceURI = ioService.newURI(s);
     let addon = {sourceURI: sourceURI, name: "bad", id: "bad"};
 
     let canInstall = AddonUtils.canInstallAddon(addon);
     do_check_false(canInstall, "Correctly rejected a bad URL");
   }
 
   for (let s of good) {
-    let sourceURI = ioService.newURI(s, null, null);
+    let sourceURI = ioService.newURI(s);
     let addon = {sourceURI: sourceURI, name: "good", id: "good"};
 
     let canInstall = AddonUtils.canInstallAddon(addon);
     do_check_true(canInstall, "Correctly accepted a good URL");
   }
   run_next_test();
 });
 
--- a/services/sync/tests/unit/test_addons_store.js
+++ b/services/sync/tests/unit/test_addons_store.js
@@ -253,17 +253,17 @@ add_test(function test_addon_syncability
 
   uninstallAddon(addon);
 
   do_check_false(store.isSourceURITrusted(null));
 
   function createURI(s) {
     let service = Components.classes["@mozilla.org/network/io-service;1"]
                   .getService(Components.interfaces.nsIIOService);
-    return service.newURI(s, null, null);
+    return service.newURI(s);
   }
 
   let trusted = [
     "https://addons.mozilla.org/foo",
     "https://other.example.com/foo"
   ];
 
   let untrusted = [
--- a/services/sync/tests/unit/test_bookmark_invalid.js
+++ b/services/sync/tests/unit/test_bookmark_invalid.js
@@ -11,17 +11,17 @@ var engine = Service.engineManager.get("
 var store = engine._store;
 var tracker = engine._tracker;
 
 add_task(async function test_ignore_invalid_uri() {
   _("Ensure that we don't die with invalid bookmarks.");
 
   // First create a valid bookmark.
   let bmid = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
-                                                  Services.io.newURI("http://example.com/", null, null),
+                                                  Services.io.newURI("http://example.com/"),
                                                   PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                   "the title");
 
   // Now update moz_places with an invalid url.
   await PlacesUtils.withConnectionWrapper("test_ignore_invalid_uri", async function(db) {
     await db.execute(
       `UPDATE moz_places SET url = :url, url_hash = hash(:url)
        WHERE id = (SELECT b.fk FROM moz_bookmarks b
@@ -34,17 +34,17 @@ add_task(async function test_ignore_inva
   engine._buildGUIDMap();
 });
 
 add_task(async function test_ignore_missing_uri() {
   _("Ensure that we don't die with a bookmark referencing an invalid bookmark id.");
 
   // First create a valid bookmark.
   let bmid = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
-                                                  Services.io.newURI("http://example.com/", null, null),
+                                                  Services.io.newURI("http://example.com/"),
                                                   PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                   "the title");
 
   // Now update moz_bookmarks to reference a non-existing places ID
   await PlacesUtils.withConnectionWrapper("test_ignore_missing_uri", async function(db) {
     await db.execute(
       `UPDATE moz_bookmarks SET fk = 999999
        WHERE id = :id`
--- a/services/sync/tests/unit/test_resource.js
+++ b/services/sync/tests/unit/test_resource.js
@@ -421,17 +421,17 @@ function run_test() {
   do_check_eq(error.result, Cr.NS_ERROR_CONNECTION_REFUSED);
   do_check_eq(error.message, "NS_ERROR_CONNECTION_REFUSED");
   do_check_eq(typeof error.stack, "string");
 
   _("Checking handling of errors in onProgress.");
   let res18 = new Resource(server.baseURI + "/json");
   let onProgress = function(rec) {
     // Provoke an XPC exception without a Javascript wrapper.
-    Services.io.newURI("::::::::", null, null);
+    Services.io.newURI("::::::::");
   };
   res18._onProgress = onProgress;
   let oldWarn = res18._log.warn;
   let warnings = [];
   res18._log.warn = function(msg) { warnings.push(msg) };
   error = undefined;
   try {
     content = res18.get();
--- a/services/sync/tests/unit/test_resource_async.js
+++ b/services/sync/tests/unit/test_resource_async.js
@@ -628,17 +628,17 @@ add_test(function test_preserve_exceptio
   });
 });
 
 add_test(function test_xpc_exception_handling() {
   _("Exception handling inside fetches.");
   let res14 = new AsyncResource(server.baseURI + "/json");
   res14._onProgress = function(rec) {
     // Provoke an XPC exception without a Javascript wrapper.
-    Services.io.newURI("::::::::", null, null);
+    Services.io.newURI("::::::::");
   };
   let warnings = [];
   res14._log.warn = function(msg) { warnings.push(msg); };
 
   res14.get(function (error, content) {
     do_check_eq(error.result, Cr.NS_ERROR_MALFORMED_URI);
     do_check_eq(error.message, "NS_ERROR_MALFORMED_URI");
     do_check_eq(content, null);
--- a/services/sync/tps/extensions/mozmill/resource/stdlib/httpd.js
+++ b/services/sync/tps/extensions/mozmill/resource/stdlib/httpd.js
@@ -1743,17 +1743,17 @@ RequestReader.prototype =
         dumpn("*** Metadata version too low");
         throw HTTP_400;
       }
 
       try
       {
         var uri = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService)
-                    .newURI(fullPath, null, null);
+                    .newURI(fullPath);
         fullPath = uri.path;
         scheme = uri.scheme;
         host = metadata._host = uri.asciiHost;
         port = uri.port;
         if (port === -1)
         {
           if (scheme === "http")
           {
--- a/services/sync/tps/extensions/mozmill/resource/stdlib/securable-module.js
+++ b/services/sync/tps/extensions/mozmill/resource/stdlib/securable-module.js
@@ -56,17 +56,17 @@
      if (principal == "system")
        return systemPrincipal;
      return principal;
    }
 
    // The base URI to we use when we're given relative URLs, if any.
    var baseURI = null;
    if (global.window)
-     baseURI = ios.newURI(global.location.href, null, null);
+     baseURI = ios.newURI(global.location.href);
    exports.baseURI = baseURI;
 
    // The "parent" chrome URI to use if we're loading code that
    // needs chrome privileges but may not have a filename that
    // matches any of SpiderMonkey's defined system filename prefixes.
    // The latter is needed so that wrappers can be automatically
    // made for the code. For more information on this, see
    // bug 418356:
@@ -308,17 +308,17 @@
    exports.LocalFileSystem.prototype = {
      resolveModule: function resolveModule(base, path) {
        path = path + ".js";
 
        var baseURI;
        if (!base)
          baseURI = this._rootURI;
        else
-         baseURI = ios.newURI(base, null, null);
+         baseURI = ios.newURI(base);
        var newURI = ios.newURI(path, null, baseURI);
        var channel = NetUtil.newChannel({
           uri: newURI,
           loadUsingSystemPrincipal: true
        });
        try {
          channel.open2().close();
        } catch (e) {
--- a/services/sync/tps/extensions/mozmill/resource/stdlib/utils.js
+++ b/services/sync/tps/extensions/mozmill/resource/stdlib/utils.js
@@ -381,17 +381,17 @@ function saveDataURL(aDataURL, aFilename
   file.append(aFilename + ".jpg");
   file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, FILE_PERMISSIONS);
 
   // Create an output stream to write to file
   let foStream = Cc["@mozilla.org/network/file-output-stream;1"]
                  .createInstance(Ci.nsIFileOutputStream);
   foStream.init(file, 0x02 | 0x08 | 0x10, FILE_PERMISSIONS, foStream.DEFER_OPEN);
 
-  let dataURI = NetUtil.newURI(aDataURL, "UTF8", null);
+  let dataURI = NetUtil.newURI(aDataURL, "UTF8");
   if (!dataURI.schemeIs("data")) {
     throw TypeError("aDataURL parameter has to have 'data'" +
                     " scheme instead of '" + dataURI.scheme + "'");
   }
 
   // Write asynchronously to buffer;
   // Input and output streams are closed after write
 
--- a/services/sync/tps/extensions/tps/resource/modules/bookmarks.jsm
+++ b/services/sync/tps/extensions/tps/resource/modules/bookmarks.jsm
@@ -495,17 +495,17 @@ Bookmark.prototype = {
    * Updates this bookmark's URI.
    *
    * @param uri The new URI to set for this boomark; if null, no changes
    *        are made
    * @return nothing
    */
   SetUri: function(uri) {
     if (uri) {
-      let newURI = Services.io.newURI(uri, null, null);
+      let newURI = Services.io.newURI(uri);
       PlacesUtils.bookmarks.changeBookmarkURI(this.props.item_id, newURI);
     }
   },
 
   /**
    * SetTags
    *
    * Updates this bookmark's tags.
@@ -513,17 +513,17 @@ Bookmark.prototype = {
    * @param tags An array of tags which should be associated with this
    *        bookmark; any previous tags are removed; if this param is null,
    *        no changes are made.  If this param is an empty array, all
    *        tags are removed from this bookmark.
    * @return nothing
    */
   SetTags: function(tags) {
     if (tags != null) {
-      let URI = Services.io.newURI(this.props.uri, null, null);
+      let URI = Services.io.newURI(this.props.uri);
       PlacesUtils.tagging.untagURI(URI, null);
       if (tags.length > 0)
         PlacesUtils.tagging.tagURI(URI, tags);
     }
   },
 
   /**
    * Create
@@ -531,17 +531,17 @@ Bookmark.prototype = {
    * Creates the bookmark described by this object's properties.
    *
    * @return the id of the created bookmark
    */
   Create: function() {
     this.props.folder_id = this.GetOrCreateFolder(this.props.location);
     Logger.AssertTrue(this.props.folder_id != -1, "Unable to create " +
       "bookmark, error creating folder " + this.props.location);
-    let bookmarkURI = Services.io.newURI(this.props.uri, null, null);
+    let bookmarkURI = Services.io.newURI(this.props.uri);
     this.props.item_id = PlacesUtils.bookmarks.insertBookmark(this.props.folder_id,
                                                         bookmarkURI,
                                                         -1,
                                                         this.props.title);
     this.SetKeyword(this.props.keyword);
     this.SetDescription(this.props.description);
     this.SetLoadInSidebar(this.props.loadInSidebar);
     this.SetTags(this.props.tags);
@@ -615,17 +615,17 @@ Bookmark.prototype = {
         loadInSidebar != this.props.loadInSidebar) {
       Logger.logPotentialError("Incorrect loadInSidebar setting - expected: " +
         this.props.loadInSidebar + ", actual: " + loadInSidebar +
         " for " + this.toString());
       return -1;
     }
     if (this.props.tags != null) {
       try {
-        let URI = Services.io.newURI(this.props.uri, null, null);
+        let URI = Services.io.newURI(this.props.uri);
         let tags = PlacesUtils.tagging.getTagsForURI(URI, {});
         tags.sort();
         this.props.tags.sort();
         if (JSON.stringify(tags) != JSON.stringify(this.props.tags)) {
           Logger.logPotentialError("Wrong tags - expected: " +
             JSON.stringify(this.props.tags) + ", actual: " +
             JSON.stringify(tags) + " for " + this.toString());
           return -1;
@@ -772,21 +772,21 @@ Livemark.prototype = {
    * @return the id of the created livemark
    */
   Create: function() {
     this.props.folder_id = this.GetOrCreateFolder(this.props.location);
     Logger.AssertTrue(this.props.folder_id != -1, "Unable to create " +
       "folder, error creating parent folder " + this.props.location);
     let siteURI = null;
     if (this.props.siteUri != null)
-      siteURI = Services.io.newURI(this.props.siteUri, null, null);
+      siteURI = Services.io.newURI(this.props.siteUri);
     let livemarkObj = {parentId: this.props.folder_id,
                        title: this.props.livemark,
                        siteURI: siteURI,
-                       feedURI: Services.io.newURI(this.props.feedUri, null, null),
+                       feedURI: Services.io.newURI(this.props.feedUri),
                        index: PlacesUtils.bookmarks.DEFAULT_INDEX};
 
     // Until this can handle asynchronous creation, we need to spin.
     let spinningCb = Async.makeSpinningCallback();
 
     PlacesUtils.livemarks.addLivemark(livemarkObj).then(
       aLivemark => { spinningCb(null, [Components.results.NS_OK, aLivemark]) },
       () => { spinningCb(null, [Components.results.NS_ERROR_UNEXPECTED, aLivemark]) }
@@ -821,28 +821,28 @@ Livemark.prototype = {
                               this.props.livemark);
     if (!PlacesUtils.annotations
                     .itemHasAnnotation(this.props.item_id, PlacesUtils.LMANNO_FEEDURI)) {
       Logger.logPotentialError("livemark folder found, but it's just a regular folder, for " +
         this.toString());
       this.props.item_id = -1;
       return -1;
     }
-    let feedURI = Services.io.newURI(this.props.feedUri, null, null);
+    let feedURI = Services.io.newURI(this.props.feedUri);
     let lmFeedURISpec =
       PlacesUtils.annotations.getItemAnnotation(this.props.item_id,
                                                 PlacesUtils.LMANNO_FEEDURI);
     if (feedURI.spec != lmFeedURISpec) {
       Logger.logPotentialError("livemark feed uri not correct, expected: " +
         this.props.feedUri + ", actual: " + lmFeedURISpec +
         " for " + this.toString());
       return -1;
     }
     if (this.props.siteUri != null) {
-      let siteURI = Services.io.newURI(this.props.siteUri, null, null);
+      let siteURI = Services.io.newURI(this.props.siteUri);
       let lmSiteURISpec =
         PlacesUtils.annotations.getItemAnnotation(this.props.item_id,
                                                   PlacesUtils.LMANNO_SITEURI);
       if (siteURI.spec != lmSiteURISpec) {
         Logger.logPotentialError("livemark site uri not correct, expected: " +
         this.props.siteUri + ", actual: " + lmSiteURISpec + " for " +
         this.toString());
         return -1;
--- a/services/sync/tps/extensions/tps/resource/modules/history.jsm
+++ b/services/sync/tps/extensions/tps/resource/modules/history.jsm
@@ -100,17 +100,17 @@ var HistoryEntry = {
    * @param usSinceEpoch The number of microseconds from Epoch to
    *        the time the current Crossweave run was started
    * @return nothing
    */
   Add: function(item, usSinceEpoch) {
     Logger.AssertTrue("visits" in item && "uri" in item,
       "History entry in test file must have both 'visits' " +
       "and 'uri' properties");
-    let uri = Services.io.newURI(item.uri, null, null);
+    let uri = Services.io.newURI(item.uri);
     let place = {
       uri: uri,
       visits: []
     };
     for (let visit of item.visits) {
       place.visits.push({
         visitDate: usSinceEpoch + (visit.date * 60 * 60 * 1000 * 1000),
         transitionType: visit.type
@@ -177,17 +177,17 @@ var HistoryEntry = {
    *
    * @param item An object representing items to delete
    * @param usSinceEpoch The number of microseconds from Epoch to
    *        the time the current Crossweave run was started
    * @return nothing
    */
   Delete: function(item, usSinceEpoch) {
     if ("uri" in item) {
-      let uri = Services.io.newURI(item.uri, null, null);
+      let uri = Services.io.newURI(item.uri);
       PlacesUtils.history.removePage(uri);
     }
     else if ("host" in item) {
       PlacesUtils.history.removePagesFromHost(item.host, false);
     }
     else if ("begin" in item && "end" in item) {
       let cb = Async.makeSpinningCallback();
       let msSinceEpoch = parseInt(usSinceEpoch / 1000);
--- a/testing/mochitest/chrome-harness.js
+++ b/testing/mochitest/chrome-harness.js
@@ -12,17 +12,17 @@ Components.utils.import("resource://gre/
  *
  * url: string of a URL (http://mochi.test/test.html)
  * returns: a nsiURI object representing the given URL
  *
  */
 function getChromeURI(url) {
   var ios = Components.classes["@mozilla.org/network/io-service;1"].
               getService(Components.interfaces.nsIIOService);
-  return ios.newURI(url, null, null);
+  return ios.newURI(url);
 }
 
 /*
  * Convert a URL (string) into a nsIURI or NSIJARURI
  * This is intended for URL's that are on a file system
  * or in packaged up in an extension .jar file
  *
  * url: a string of a url on the local system(http://localhost/blah.html)
--- a/testing/mochitest/jetpack-addon-harness.js
+++ b/testing/mochitest/jetpack-addon-harness.js
@@ -27,17 +27,17 @@ function realPath(chrome) {
                .replace(".xpi", "");
 }
 
 const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"]
       .getService(Ci.nsIChromeRegistry);
 
 // Installs a single add-on returning a promise for when install is completed
 function installAddon(url) {
-  let chromeURL = Services.io.newURI(url, null, null);
+  let chromeURL = Services.io.newURI(url);
   let file = chromeRegistry.convertChromeURL(chromeURL)
       .QueryInterface(Ci.nsIFileURL).file;
 
   let addon;
   const listener = {
     onInstalling(_addon) {
       addon = _addon;
       // Set add-on's test options
--- a/testing/mochitest/jetpack-package-harness.js
+++ b/testing/mochitest/jetpack-package-harness.js
@@ -124,17 +124,17 @@ function testInit() {
       arrayOfTestFiles(links, fileNames, fileNameRegexp);
 
       if (config.startAt || config.endAt) {
         fileNames = skipTests(fileNames, config.startAt, config.endAt);
       }
 
       // The SDK assumes it is being run from resource URIs
       let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry);
-      let realPath = chromeReg.convertChromeURL(Services.io.newURI(TEST_PACKAGE, null, null));
+      let realPath = chromeReg.convertChromeURL(Services.io.newURI(TEST_PACKAGE));
       let resProtocol = Cc["@mozilla.org/network/protocol;1?name=resource"].getService(Ci.nsIResProtocolHandler);
       resProtocol.setSubstitution("jetpack-package-tests", realPath);
 
       // Set the test options
       const options = {
         test: {
           iterations: config.runUntilFailure ? config.repeat : 1,
           stop: false,
--- a/testing/specialpowers/content/SpecialPowersObserverAPI.js
+++ b/testing/specialpowers/content/SpecialPowersObserverAPI.js
@@ -174,17 +174,17 @@ SpecialPowersObserverAPI.prototype = {
       if (path.match(/\.(dmp|extra)$/) && !aToIgnore[path]) {
         crashDumpFiles.push(path);
       }
     }
     return crashDumpFiles.concat();
   },
 
   _getURI: function (url) {
-    return Services.io.newURI(url, null, null);
+    return Services.io.newURI(url);
   },
 
   _readUrlAsString: function(aUrl) {
     // Fetch script content as we can't use scriptloader's loadSubScript
     // to evaluate http:// urls...
     var scriptableStream = Cc["@mozilla.org/scriptableinputstream;1"]
                              .getService(Ci.nsIScriptableInputStream);
 
@@ -503,17 +503,17 @@ SpecialPowersObserverAPI.prototype = {
           message.errorMessage = e.toString();
         }
         return message;
       }
 
       case "SPCleanUpSTSData": {
         let origin = aMessage.data.origin;
         let flags = aMessage.data.flags;
-        let uri = Services.io.newURI(origin, null, null);
+        let uri = Services.io.newURI(origin);
         let sss = Cc["@mozilla.org/ssservice;1"].
                   getService(Ci.nsISiteSecurityService);
         sss.removeState(Ci.nsISiteSecurityService.HEADER_HSTS, uri, flags);
         return undefined;
       }
 
       case "SPLoadExtension": {
         let {Extension} = Components.utils.import("resource://gre/modules/Extension.jsm", {});
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -1767,24 +1767,24 @@ SpecialPowersAPI.prototype = {
   },
 
   _getPrincipalFromArg: function(arg) {
     let principal;
     let secMan = Services.scriptSecurityManager;
 
     if (typeof(arg) == "string") {
       // It's an URL.
-      let uri = Services.io.newURI(arg, null, null);
+      let uri = Services.io.newURI(arg);
       principal = secMan.createCodebasePrincipal(uri, {});
     } else if (arg.nodePrincipal) {
       // It's a document.
       // In some tests the arg is a wrapped DOM element, so we unwrap it first.
       principal = unwrapIfWrapped(arg).nodePrincipal;
     } else {
-      let uri = Services.io.newURI(arg.url, null, null);
+      let uri = Services.io.newURI(arg.url);
       let attrs = arg.originAttributes || {};
       principal = secMan.createCodebasePrincipal(uri, attrs);
     }
 
     return principal;
   },
 
   addPermission: function(type, allow, arg, expireType, expireTime) {
--- a/testing/talos/talos/pageloader/chrome/pageloader.js
+++ b/testing/talos/talos/pageloader/chrome/pageloader.js
@@ -164,17 +164,17 @@ function plInit() {
                .garbageCollect) {
       forceCC = false;
     }
 
     gIOS = Cc["@mozilla.org/network/io-service;1"]
       .getService(Ci.nsIIOService);
     if (args.offline)
       gIOS.offline = true;
-    var fileURI = gIOS.newURI(manifestURI, null, null);
+    var fileURI = gIOS.newURI(manifestURI);
     pages = plLoadURLsFromURI(fileURI);
 
     if (!pages) {
       dumpLine('tp: could not load URLs, quitting');
       plStop(true);
     }
 
     if (pages.length == 0) {
--- a/testing/talos/talos/tests/tabswitch/content/tabswitch-content-process.js
+++ b/testing/talos/talos/tests/tabswitch/content/tabswitch-content-process.js
@@ -6,17 +6,17 @@ Cu.import("resource://gre/modules/XPCOMU
 const CHROME_URI = "chrome://tabswitch/content/test.html";
 
 class TabSwitchAboutModule {
   constructor() {
     this.QueryInterface = XPCOMUtils.generateQI([Ci.nsIAboutModule]);
   }
 
   newChannel(aURI, aLoadInfo) {
-    let uri = Services.io.newURI(CHROME_URI, null, null);
+    let uri = Services.io.newURI(CHROME_URI);
     let chan = Services.io.newChannelFromURIWithLoadInfo(uri, aLoadInfo);
     chan.originalURI = aURI;
     return chan;
   }
 
   getURIFlags(aURI) {
     return Ci.nsIAboutModule.ALLOW_SCRIPT |
            Ci.nsIAboutModule.URI_MUST_LOAD_IN_CHILD;
--- a/uriloader/exthandler/nsWebHandlerApp.js
+++ b/uriloader/exthandler/nsWebHandlerApp.js
@@ -71,17 +71,17 @@ nsWebHandlerApp.prototype = {
 
     // encode the URI to be handled
     var escapedUriSpecToHandle = encodeURIComponent(aURI.spec);
 
     // insert the encoded URI and create the object version 
     var uriSpecToSend = this.uriTemplate.replace("%s", escapedUriSpecToHandle);
     var ioService = Cc["@mozilla.org/network/io-service;1"].
                     getService(Ci.nsIIOService);
-    var uriToSend = ioService.newURI(uriSpecToSend, null, null);
+    var uriToSend = ioService.newURI(uriSpecToSend);
     
     // if we have a window context, use the URI loader to load there
     if (aWindowContext) {
       try {
         // getInterface throws if the object doesn't implement the given
         // interface, so this try/catch statement is more of an if.
         // If aWindowContext refers to a remote docshell, send the load
         // request to the correct process.
--- a/uriloader/exthandler/tests/mochitest/handlerApps.js
+++ b/uriloader/exthandler/tests/mochitest/handlerApps.js
@@ -15,17 +15,17 @@ function test() {
   webHandler.name = "Test Web Handler App";
   webHandler.uriTemplate =
       "http://mochi.test:8888/tests/uriloader/exthandler/tests/mochitest/" + 
       "handlerApp.xhtml?uri=%s";
   
   // set up the uri to test with
   var ioService = Cc["@mozilla.org/network/io-service;1"].
     getService(SpecialPowers.Ci.nsIIOService);
-  var uri = ioService.newURI(testURI, null, null);
+  var uri = ioService.newURI(testURI);
 
   // create a window, and launch the handler in it
   var newWindow = window.open("", "handlerWindow", "height=300,width=300");
   var windowContext = 
     SpecialPowers.wrap(newWindow).QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).
     getInterface(SpecialPowers.Ci.nsIWebNavigation).
     QueryInterface(SpecialPowers.Ci.nsIDocShell);
  
@@ -78,17 +78,17 @@ function test() {
   } else {
     // assume a generic UNIX variant
     exe = Cc["@mozilla.org/file/local;1"].
           createInstance(SpecialPowers.Ci.nsILocalFile);
     exe.initWithPath("/bin/echo");
   }
 
   localHandler.executable = exe;
-  localHandler.launchWithURI(ioService.newURI(testURI, null, null));
+  localHandler.launchWithURI(ioService.newURI(testURI));
 
   // if we get this far without an exception, we've passed
   ok(true, "localHandler launchWithURI test");
 
   // if we ever decide that killing iCal is the right thing to do, change 
   // the if statement below from "NOTDarwin" to "Darwin"
   if (osString == "NOTDarwin") {
 
--- a/uriloader/exthandler/tests/mochitest/head.js
+++ b/uriloader/exthandler/tests/mochitest/head.js
@@ -52,17 +52,17 @@ function createMockedObjects(createHandl
         return target[property];
       }
     },
   });
 
   // Mock the launcher:
   let mockedLauncher = {
     MIMEInfo: mockedMIME,
-    source: Services.io.newURI("http://www.mozilla.org/", null, null),
+    source: Services.io.newURI("http://www.mozilla.org/"),
     suggestedFileName: "test_download_dialog.abc",
     targetFileIsExecutable: false,
     saveToDisk() {},
     cancel() {},
     launchWithApplication() {},
     setWebProgressListener() {},
     saveDestinationAvailable() {},
     contentLength: 42,
--- a/uriloader/exthandler/tests/unit/test_punycodeURIs.js
+++ b/uriloader/exthandler/tests/unit/test_punycodeURIs.js
@@ -107,17 +107,17 @@ function run_test() {
   envSvc.set("DYLD_LIBRARY_PATH", greDir.path);
   // For Linux
   envSvc.set("LD_LIBRARY_PATH", greDir.path);
   //XXX: handle windows
 
   // Now tell it where we want the file.
   envSvc.set("WRITE_ARGUMENT_FILE", outFile.path);
 
-  var uri = ioService.newURI(kTestURI, null, null);
+  var uri = ioService.newURI(kTestURI);
 
   // Just check we've got these matching, if we haven't there's a problem
   // with ascii spec or our test case.
   do_check_eq(uri.asciiSpec, kExpectedURI);
 
   localHandler.executable = exe;
   localHandler.launchWithURI(uri);