Bug 1425003 - Fix GeckoViewNavigation.jsm referencing undefined URIFIxup - switch to Services.uriFixup. r?snorp draft
authorMark Banner <standard8@mozilla.com>
Wed, 13 Dec 2017 09:02:36 -0600
changeset 711223 15a2a12b6928a591fc1edb78563cb5f5149e24ad
parent 711178 defccba824aa91e8d4d820b1defaadfdca34bac7
child 743765 d115eecf6c4950222419dd4039a8f19739094b93
push id93021
push userbmo:standard8@mozilla.com
push dateWed, 13 Dec 2017 15:03:56 +0000
reviewerssnorp
bugs1425003
milestone59.0a1
Bug 1425003 - Fix GeckoViewNavigation.jsm referencing undefined URIFIxup - switch to Services.uriFixup. r?snorp MozReview-Commit-ID: IKs6HBQwLAU
mobile/android/chrome/content/browser.js
mobile/android/modules/geckoview/GeckoViewNavigation.jsm
--- 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,
     };