mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws.
This commit is contained in:
parent
55f78ce0fa
commit
fc6379e827
4
addon-sdk/source/app-extension/bootstrap.js
vendored
4
addon-sdk/source/app-extension/bootstrap.js
vendored
@ -116,7 +116,7 @@ function startup(data, reasonCode) {
|
||||
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.
|
||||
@ -179,7 +179,7 @@ function startup(data, reasonCode) {
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -27,7 +27,7 @@ const registerSDKURI = () => {
|
||||
.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();
|
||||
|
@ -280,7 +280,7 @@ function getPotentialLeaks() {
|
||||
|
||||
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);
|
||||
|
@ -17,7 +17,7 @@ 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) =>
|
||||
|
@ -27,7 +27,7 @@ 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) {
|
||||
|
@ -17,7 +17,7 @@ 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;
|
||||
|
||||
|
@ -192,7 +192,7 @@ function open(uri, 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.
|
||||
|
@ -1646,7 +1646,7 @@ RequestReader.prototype =
|
||||
{
|
||||
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;
|
||||
|
@ -1646,7 +1646,7 @@ RequestReader.prototype =
|
||||
{
|
||||
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;
|
||||
|
@ -1647,7 +1647,7 @@ RequestReader.prototype =
|
||||
{
|
||||
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;
|
||||
|
@ -106,7 +106,7 @@ function startup(data, reasonCode) {
|
||||
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.
|
||||
@ -169,7 +169,7 @@ function startup(data, reasonCode) {
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -1646,7 +1646,7 @@ RequestReader.prototype =
|
||||
{
|
||||
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;
|
||||
|
@ -106,7 +106,7 @@ function startup(data, reasonCode) {
|
||||
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.
|
||||
@ -169,7 +169,7 @@ function startup(data, reasonCode) {
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -1647,7 +1647,7 @@ RequestReader.prototype =
|
||||
{
|
||||
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;
|
||||
|
@ -147,7 +147,7 @@ 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;
|
||||
@ -211,7 +211,7 @@ 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;
|
||||
|
@ -10,7 +10,7 @@ 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() {
|
||||
|
@ -141,8 +141,7 @@ function testRegister(assert, text) {
|
||||
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;
|
||||
@ -164,7 +163,7 @@ function testRegister(assert, text) {
|
||||
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
|
||||
);
|
||||
|
||||
|
@ -607,9 +607,7 @@ var shell = {
|
||||
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);
|
||||
@ -819,16 +817,16 @@ var CustomEventManager = {
|
||||
'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();
|
||||
|
@ -20,7 +20,7 @@ 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;
|
||||
|
@ -151,7 +151,7 @@ this.AboutServiceWorkers = {
|
||||
|
||||
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) {
|
||||
|
@ -13,7 +13,7 @@ function debug(msg) {
|
||||
|
||||
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;
|
||||
@ -58,7 +58,7 @@ B2GAboutRedirector.prototype = {
|
||||
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);
|
||||
|
||||
|
@ -138,7 +138,7 @@ var ErrorPage = {
|
||||
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);
|
||||
|
@ -71,7 +71,7 @@ this.SafeMode = {
|
||||
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");
|
||||
|
@ -4,7 +4,7 @@ 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;
|
||||
|
@ -14,7 +14,7 @@ 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);
|
||||
}
|
||||
|
@ -29,8 +29,7 @@ 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);
|
||||
@ -42,8 +41,7 @@ function test_succeeded_mapping(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);
|
||||
|
@ -29,8 +29,7 @@ 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);
|
||||
@ -42,8 +41,7 @@ function test_succeeded_mapping(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);
|
||||
|
@ -28,8 +28,7 @@ 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);
|
||||
@ -41,8 +40,7 @@ function test_succeeded_mapping(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);
|
||||
|
@ -30,7 +30,7 @@ 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);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ function test_uri(obj)
|
||||
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";
|
||||
|
@ -17,7 +17,7 @@ var gCR = Cc["@mozilla.org/chrome/chrome-registry;1"].
|
||||
* 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);
|
||||
@ -32,7 +32,7 @@ function test_mapping(chromeURL, target) {
|
||||
* 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");
|
||||
@ -50,7 +50,7 @@ function test_removed_mapping(chromeURL, target) {
|
||||
*/
|
||||
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") ?
|
||||
|
@ -7,7 +7,7 @@ function run_test()
|
||||
|
||||
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;
|
||||
|
||||
|
@ -45,7 +45,7 @@ function run_test()
|
||||
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;
|
||||
|
||||
|
@ -160,7 +160,7 @@ function run_test()
|
||||
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
|
||||
|
@ -64,7 +64,7 @@ function do_run_test()
|
||||
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
|
||||
|
@ -9,7 +9,7 @@ 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);
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ function run_test() {
|
||||
// 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());
|
||||
|
@ -16,7 +16,7 @@ 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);
|
||||
|
@ -109,7 +109,7 @@ ContentAreaDropListener.prototype =
|
||||
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;
|
||||
@ -124,7 +124,7 @@ ContentAreaDropListener.prototype =
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -34,7 +34,7 @@ function run_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');
|
||||
@ -65,7 +65,7 @@ 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);
|
||||
|
||||
@ -85,7 +85,7 @@ add_test(function test_cancel2() {
|
||||
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');
|
||||
@ -110,8 +110,8 @@ add_test(function test_cancel3() {
|
||||
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');
|
||||
|
@ -1014,7 +1014,7 @@ BrowserElementChild.prototype = {
|
||||
if (expectedUrl) {
|
||||
let expectedURI
|
||||
try {
|
||||
expectedURI = Services.io.newURI(expectedUrl, null, null);
|
||||
expectedURI = Services.io.newURI(expectedUrl);
|
||||
} catch(e) {
|
||||
sendError("Malformed URL");
|
||||
return;
|
||||
|
@ -692,7 +692,7 @@ BrowserElementParent.prototype = {
|
||||
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));
|
||||
@ -781,7 +781,7 @@ BrowserElementParent.prototype = {
|
||||
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);
|
||||
|
@ -159,7 +159,7 @@ function testAuthJarNoInterfere(e) {
|
||||
.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.
|
||||
@ -200,7 +200,7 @@ function testAuthJarInterfere(e) {
|
||||
.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});
|
||||
|
@ -35,7 +35,7 @@ function checkCache(url, inMemory, shouldExist, cb)
|
||||
};
|
||||
};
|
||||
|
||||
storage.asyncOpenURI(Services.io.newURI(url, null, null), "",
|
||||
storage.asyncOpenURI(Services.io.newURI(url), "",
|
||||
Components.interfaces.nsICacheStorage.OPEN_READONLY,
|
||||
new CheckCacheListener(inMemory, shouldExist));
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
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) {}
|
||||
|
||||
|
@ -98,7 +98,7 @@ function setPermission(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, {});
|
||||
@ -113,7 +113,7 @@ 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, {});
|
||||
@ -127,7 +127,7 @@ 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, {});
|
||||
|
@ -13,7 +13,7 @@ function testSteps()
|
||||
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);
|
||||
|
@ -105,7 +105,7 @@ function testSteps()
|
||||
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,
|
||||
|
@ -23,7 +23,7 @@ function testSteps()
|
||||
.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,
|
||||
|
@ -225,7 +225,7 @@ function testSteps()
|
||||
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);
|
||||
|
@ -66,7 +66,7 @@ function testSteps()
|
||||
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);
|
||||
|
@ -19,7 +19,7 @@ function testSteps()
|
||||
.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;
|
||||
|
@ -47,7 +47,7 @@ function testSteps()
|
||||
|
||||
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, {});
|
||||
|
@ -23,7 +23,7 @@ function testSteps()
|
||||
.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,
|
||||
|
@ -23,7 +23,7 @@ function testSteps()
|
||||
.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,
|
||||
|
@ -564,7 +564,7 @@ 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, {});
|
||||
|
@ -116,14 +116,14 @@ function* test_domainPolicy() {
|
||||
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"));
|
||||
|
@ -158,7 +158,7 @@ IdpSandbox.createIdpUri = function(domain, protocol) {
|
||||
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');
|
||||
|
@ -606,7 +606,7 @@ RTCPeerConnection.prototype = {
|
||||
|
||||
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");
|
||||
|
@ -1,6 +1,6 @@
|
||||
"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;
|
||||
|
@ -331,7 +331,7 @@ ChromecastRemoteDisplayDevice.prototype = {
|
||||
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";
|
||||
},
|
||||
|
||||
|
@ -296,7 +296,7 @@ Object.defineProperties(PushRecord.prototype, {
|
||||
}
|
||||
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 =
|
||||
|
@ -395,7 +395,7 @@ this.PushService = {
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -312,7 +312,7 @@ SubscriptionListener.prototype = {
|
||||
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);
|
||||
|
@ -622,7 +622,7 @@ this.PushServiceWebSocket = {
|
||||
|
||||
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));
|
||||
|
@ -21,7 +21,7 @@ function visitURI(uri, timestamp) {
|
||||
}
|
||||
|
||||
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]);
|
||||
|
@ -34,7 +34,7 @@ function makePushPermission(url, 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',
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ function run_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]);
|
||||
|
@ -64,7 +64,7 @@ function testPermissionCheck(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 {
|
||||
|
@ -231,7 +231,7 @@ add_test(function test_unsubscribe_error() {
|
||||
|
||||
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 */
|
||||
);
|
||||
|
@ -178,7 +178,7 @@ SettingsDB.prototype = {
|
||||
// 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";
|
||||
|
@ -51,7 +51,7 @@ function test()
|
||||
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);
|
||||
|
@ -301,7 +301,7 @@ manifestURL: function(overload)
|
||||
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);
|
||||
},
|
||||
|
||||
|
@ -8,10 +8,10 @@ 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));
|
||||
|
@ -31,12 +31,12 @@ function run_test() {
|
||||
.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, {});
|
||||
|
@ -55,18 +55,18 @@ function run_test() {
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
@ -155,8 +155,8 @@ add_task(function test() {
|
||||
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;
|
||||
|
@ -209,8 +209,8 @@ add_task(function test() {
|
||||
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;
|
||||
|
@ -209,8 +209,8 @@ add_task(function test() {
|
||||
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;
|
||||
|
@ -187,10 +187,10 @@ add_task(function test() {
|
||||
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;
|
||||
|
@ -7,7 +7,7 @@ function run_test() {
|
||||
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});
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,8 @@ function run_test() {
|
||||
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);
|
||||
|
@ -11,7 +11,7 @@ function isParentProcess() {
|
||||
}
|
||||
|
||||
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, {});
|
||||
|
@ -11,7 +11,7 @@ function isParentProcess() {
|
||||
}
|
||||
|
||||
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, {});
|
||||
|
@ -160,7 +160,7 @@ function getLDAPAttributes(host, base, filter, attribs, isSecure) {
|
||||
|
||||
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]
|
||||
|
@ -5,6 +5,6 @@
|
||||
// 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');
|
||||
|
@ -10,7 +10,7 @@ var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
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');
|
||||
|
@ -9,6 +9,6 @@
|
||||
// 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');
|
||||
|
File diff suppressed because one or more lines are too long
@ -83,7 +83,7 @@ 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;
|
||||
|
@ -35,7 +35,7 @@ function run_test() {
|
||||
// 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 = {};
|
||||
|
@ -365,7 +365,7 @@ RTestURLList.prototype = {
|
||||
|
||||
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 {
|
||||
|
@ -15,7 +15,7 @@ function setPermissions() {
|
||||
.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);
|
||||
}
|
||||
|
||||
|
@ -815,7 +815,7 @@ function AddPrefSettings(aWhere, aPrefName, aPrefValExpression, aSandbox, aTestP
|
||||
|
||||
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);
|
||||
@ -1219,7 +1219,7 @@ function ServeFiles(manifestPrincipal, depth, aURL, files)
|
||||
.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);
|
||||
|
@ -58,7 +58,7 @@ var Feedback = {
|
||||
|
||||
_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;
|
||||
}
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ var healthReportWrapper = {
|
||||
_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;
|
||||
},
|
||||
|
@ -300,10 +300,10 @@ function resolveGeckoURI(aURI) {
|
||||
|
||||
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;
|
||||
}
|
||||
@ -1317,7 +1317,7 @@ var BrowserApp = {
|
||||
*/
|
||||
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) {
|
||||
@ -1643,7 +1643,7 @@ var BrowserApp = {
|
||||
// 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
|
||||
@ -2946,7 +2946,7 @@ var NativeWindow = {
|
||||
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;
|
||||
@ -3271,7 +3271,7 @@ nsBrowserAccess.prototype = {
|
||||
if (aOpener) {
|
||||
try {
|
||||
let location = aOpener.location;
|
||||
referrer = Services.io.newURI(location, null, null);
|
||||
referrer = Services.io.newURI(location);
|
||||
} catch(e) { }
|
||||
}
|
||||
|
||||
@ -3457,7 +3457,7 @@ Tab.prototype = {
|
||||
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
|
||||
@ -4264,7 +4264,7 @@ Tab.prototype = {
|
||||
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.
|
||||
@ -4574,7 +4574,7 @@ var BrowserEventHandler = {
|
||||
((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;
|
||||
@ -4712,7 +4712,7 @@ var ErrorPageEventHandler = {
|
||||
// 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)
|
||||
@ -6208,7 +6208,7 @@ var SearchEngines = {
|
||||
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);
|
||||
@ -6223,7 +6223,7 @@ var SearchEngines = {
|
||||
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);
|
||||
@ -6785,7 +6785,7 @@ var Tabs = {
|
||||
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);
|
||||
|
@ -111,7 +111,7 @@ AboutRedirector.prototype = {
|
||||
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);
|
||||
|
||||
|
@ -20,12 +20,12 @@ BrowserCLH.prototype = {
|
||||
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) {
|
||||
|
@ -584,7 +584,7 @@ var PromptUtils = {
|
||||
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 != "/")
|
||||
|
@ -1295,7 +1295,7 @@ SessionStore.prototype = {
|
||||
_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);
|
||||
@ -1305,11 +1305,11 @@ SessionStore.prototype = {
|
||||
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) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user