Bug 1425003 - Fix GeckoViewNavigation.jsm referencing undefined URIFIxup - switch to Services.uriFixup. r=snorp
authorMark Banner <standard8@mozilla.com>
Wed, 13 Dec 2017 09:02:36 -0600
changeset 448457 67c2ae51ba58be51a545e57f49de8d4df2b9c51a
parent 448456 62f2f4f36999ba3a2e7b7d964ede96eb3d0fe380
child 448458 dd25e7aba0033b423e09f457ad298787c57a86c9
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1425003
milestone59.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 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,
     };