Bug 1440592 - [5.0] Fix merge error with bug 1422084 on CLOSED TREE. r=me
authorEugen Sawin <esawin@mozilla.com>
Fri, 09 Mar 2018 20:34:41 +0100
changeset 462428 4f5d6034a9ca884707d2d3054b8bbcc7d613d171
parent 462427 bf56e43e67adee8116c18fd2245327219013c2e7
child 462429 a471a4087690521628d99dd02f402447c67f404a
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1440592, 1422084
milestone60.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 1440592 - [5.0] Fix merge error with bug 1422084 on CLOSED TREE. r=me
mobile/android/chrome/geckoview/GeckoViewNavigationContent.js
mobile/android/modules/geckoview/LoadURIDelegate.jsm
--- a/mobile/android/chrome/geckoview/GeckoViewNavigationContent.js
+++ b/mobile/android/chrome/geckoview/GeckoViewNavigationContent.js
@@ -2,16 +2,17 @@
 /* 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/. */
 
 ChromeUtils.import("resource://gre/modules/GeckoViewContentModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
+  ErrorPageEventHandler: "chrome://geckoview/content/ErrorPageEventHandler.js",
   LoadURIDelegate: "resource://gre/modules/LoadURIDelegate.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "dump", () =>
   ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
                      {}).AndroidLog.d.bind(null, "ViewNavigation[C]"));
 
 function debug(aMsg) {
@@ -30,14 +31,19 @@ class GeckoViewNavigationContent extends
 
     docShell.loadURIDelegate = null;
   }
 
   // nsILoadURIDelegate.
   loadURI(aUri, aWhere, aFlags, aTriggeringPrincipal) {
     debug("loadURI " + (aUri && aUri.spec) + " " + aWhere + " " + aFlags);
 
+    // TODO: Remove this when we have a sensible error API.
+    if (aUri && aUri.displaySpec.startsWith("about:certerror")) {
+      addEventListener("click", ErrorPageEventHandler, true);
+    }
+
     return LoadURIDelegate.load(this.eventDispatcher, aUri, aWhere, aFlags,
                                 aTriggeringPrincipal);
   }
 }
 
 var navigationListener = new GeckoViewNavigationContent("GeckoViewNavigation", this);
--- a/mobile/android/modules/geckoview/LoadURIDelegate.jsm
+++ b/mobile/android/modules/geckoview/LoadURIDelegate.jsm
@@ -4,29 +4,23 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 var EXPORTED_SYMBOLS = ["LoadURIDelegate"];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
-  ErrorPageEventHandler: "chrome://geckoview/content/ErrorPageEventHandler.js",
   Services: "resource://gre/modules/Services.jsm",
 });
 
 var LoadURIDelegate = {
   // Delegate URI loading to the app.
   // Return whether the loading has been handled.
   load: function(aEventDispatcher, aUri, aWhere, aFlags, aTriggeringPrincipal) {
-    // TODO: Remove this when we have a sensible error API.
-    if (aUri && aUri.displaySpec.startsWith("about:certerror")) {
-      addEventListener("click", ErrorPageEventHandler, true);
-    }
-
     const message = {
       type: "GeckoView:OnLoadRequest",
       uri: aUri ? aUri.displaySpec : "",
       where: aWhere,
       flags: aFlags
     };
 
     let handled = undefined;