Backed out changeset 34e24b0fb7b7 (bug 1522989) for ESLint failures.
authorDorel Luca <dluca@mozilla.com>
Sat, 26 Jan 2019 06:08:50 +0200
changeset 515535 33ca2ea6b37064d12c0d4fefc81bf689396a5e57
parent 515534 34e24b0fb7b7296e7a4b928dd217b15d2f0d96ac
child 515536 4c5dafe7351892a28095a98f8f161f41126168c6
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1522989
milestone66.0a1
backs out34e24b0fb7b7296e7a4b928dd217b15d2f0d96ac
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
Backed out changeset 34e24b0fb7b7 (bug 1522989) for ESLint failures.
browser/components/shell/HeadlessShell.jsm
--- a/browser/components/shell/HeadlessShell.jsm
+++ b/browser/components/shell/HeadlessShell.jsm
@@ -8,45 +8,38 @@ var EXPORTED_SYMBOLS = ["HeadlessShell"]
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 
 // Refrences to the progress listeners to keep them from being gc'ed
 // before they are called.
 const progressListeners = new Map();
 
-function loadContentWindow(webNavigation, url, principal) {
-  let uri;
-  try {
-    uri = Services.io.newURI(url);
-  } catch (e) {
-    Cu.reportError(`Invalid URL passed to loadContentWindow(): ${url}`);
-    return;
-  }
+function loadContentWindow(webNavigation, uri, principal) {
   return new Promise((resolve, reject) => {
     let loadURIOptions = {
       triggeringPrincipal: principal,
     };
-    webNavigation.loadURI(uri.spec, loadURIOptions);
+    webNavigation.loadURI(uri, loadURIOptions);
     let docShell = webNavigation.QueryInterface(Ci.nsIInterfaceRequestor)
                                 .getInterface(Ci.nsIDocShell);
     let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIWebProgress);
     let progressListener = {
       onLocationChange(progress, request, location, flags) {
         // Ignore inner-frame events
         if (progress != webProgress) {
           return;
         }
         // Ignore events that don't change the document
         if (flags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
           return;
         }
         // Ignore the initial about:blank
-        if (uri.spec != location.spec) {
+        if (uri != location.spec) {
           return;
         }
         let contentWindow = docShell.domWindow;
         progressListeners.delete(progressListener);
         webProgress.removeProgressListener(progressListener);
         contentWindow.addEventListener("load", (event) => {
           resolve(contentWindow);
         }, { once: true });