Bug 1425003 - Fix GeckoViewNavigation.jsm referencing undefined URIFIxup - switch to Services.uriFixup. r?snorp
MozReview-Commit-ID: IKs6HBQwLAU
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -259,19 +259,16 @@ XPCOMUtils.defineLazyServiceGetter(this,
"@mozilla.org/widget/hapticfeedback;1", "nsIHapticFeedback");
XPCOMUtils.defineLazyServiceGetter(this, "ParentalControls",
"@mozilla.org/parental-controls-service;1", "nsIParentalControlsService");
XPCOMUtils.defineLazyServiceGetter(this, "DOMUtils",
"@mozilla.org/inspector/dom-utils;1", "inIDOMUtils");
-XPCOMUtils.defineLazyServiceGetter(window, "URIFixup",
- "@mozilla.org/docshell/urifixup;1", "nsIURIFixup");
-
XPCOMUtils.defineLazyModuleGetter(this, "Log",
"resource://gre/modules/AndroidLog.jsm", "AndroidLog");
// Define the "dump" function as a binding of the Log.d function so it specifies
// the "debug" priority and a log tag.
function dump(msg) {
Log.d("Browser", msg);
}
@@ -4424,17 +4421,17 @@ Tab.prototype = {
GlobalEventDispatcher.sendRequest(message);
return;
}
this._hostChanged = true;
let fixedURI = aLocationURI;
try {
- fixedURI = URIFixup.createExposableURI(aLocationURI);
+ fixedURI = Services.uriFixup.createExposableURI(aLocationURI);
} catch (ex) { }
// In restricted profiles, we refuse to let you open various urls.
if (!ParentalControls.isAllowed(ParentalControls.BROWSE, fixedURI)) {
if (aRequest) {
aRequest.cancel(Cr.NS_BINDING_ABORTED);
}
@@ -6803,9 +6800,8 @@ HTMLContextMenuItem.prototype = Object.c
icon: elt.icon,
label: elt.label,
disabled: elt.disabled,
menu: elt instanceof HTMLMenuElement
};
}
},
});
-
--- a/mobile/android/modules/geckoview/GeckoViewNavigation.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewNavigation.jsm
@@ -196,17 +196,17 @@ class GeckoViewNavigation extends GeckoV
// WebProgress event handler.
onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
debug("onLocationChange");
let fixedURI = aLocationURI;
try {
- fixedURI = URIFixup.createExposableURI(aLocationURI);
+ fixedURI = Services.uriFixup.createExposableURI(aLocationURI);
} catch (ex) { }
let message = {
type: "GeckoView:LocationChange",
uri: fixedURI.displaySpec,
canGoBack: this.browser.canGoBack,
canGoForward: this.browser.canGoForward,
};