Backed out changeset f5716082ad9c (bug 1585217) for causing ESlint failure CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Tue, 01 Oct 2019 05:51:21 +0300
changeset 495769 38fa2d18cb78c1795640a8978ae1eff44c782d57
parent 495768 f5716082ad9c229a0ebd7ea8c905f0129dd5fdfc
child 495770 a6c9b805fb3de226ae08db386892f968095c3509
push id114140
push userdvarga@mozilla.com
push dateWed, 02 Oct 2019 18:04:51 +0000
treeherdermozilla-inbound@32eb0ea893f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1585217
milestone71.0a1
backs outf5716082ad9c229a0ebd7ea8c905f0129dd5fdfc
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 f5716082ad9c (bug 1585217) for causing ESlint failure CLOSED TREE
layout/tools/layout-debug/ui/content/layoutdebug.js
--- a/layout/tools/layout-debug/ui/content/layoutdebug.js
+++ b/layout/tools/layout-debug/ui/content/layoutdebug.js
@@ -136,61 +136,16 @@ for (let [name, pref] of Object.entries(
 }
 
 for (let name of COMMANDS) {
   Debugger.prototype[name] = function() {
     this._sendMessage(name);
   };
 }
 
-const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-function autoCloseIfNeeded(aCrash) {
-  if (!gArgs.autoclose) {
-    return;
-  }
-  setTimeout(function() {
-    if (aCrash) {
-      let browser = document.createElementNS(XUL_NS, "browser");
-      // FIXME(emilio): we could use gBrowser if we bothered get the process switches right.
-      //
-      // Doesn't seem worth for this particular case.
-      document.documentElement.appendChild(browser);
-      browser.loadURI("about:crashparent", {
-        triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
-      });
-      return;
-    }
-    if (gArgs.profile && Services.profiler) {
-      dumpProfile();
-    } else {
-      Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit);
-    }
-  }, gArgs.delay * 1000);
-}
-
-const TabCrashedObserver = {
-  observe(subject, topic, data) {
-    switch (topic) {
-      case "ipc:content-shutdown":
-        subject.QueryInterface(Ci.nsIPropertyBag2);
-        if (!subject.get("abnormal")) {
-          return;
-        }
-        break;
-      case "oop-frameloader-crashed":
-        break;
-    }
-    autoCloseIfNeeded(true);
-  }
-};
-
-Services.obs.addObserver(TabCrashedObserver, "ipc:content-shutdown");
-Services.obs.addObserver(TabCrashedObserver, "oop-frameloader-crashed");
-
 function nsLDBBrowserContentListener() {
   this.init();
 }
 
 nsLDBBrowserContentListener.prototype = {
   init: function() {
     this.mStatusText = document.getElementById("status-text");
     this.mForwardButton = document.getElementById("forward-button");
@@ -214,24 +169,29 @@ nsLDBBrowserContentListener.prototype = 
       this.setButtonEnabled(this.mForwardButton, gBrowser.canGoForward);
       this.setButtonEnabled(this.mBackButton, gBrowser.canGoBack);
       this.mStatusText.value = "loading...";
       this.mLoading = true;
     } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
       this.setButtonEnabled(this.mStopButton, false);
       this.mStatusText.value = gURLBar.value + " loaded";
       this.mLoading = false;
-
-      if (gBrowser.currentURI.spec != "about:blank") {
+      if (gArgs.autoclose && gBrowser.currentURI.spec != "about:blank") {
         // We check for about:blank just to avoid one or two STATE_STOP
         // notifications that occur before the loadURI() call completes.
         // This does mean that --autoclose doesn't work when the URL on
         // the command line is about:blank (or not specified), but that's
         // not a big deal.
-        autoCloseIfNeeded(false);
+        setTimeout(function() {
+          if (gArgs.profile && Services.profiler) {
+            dumpProfile();
+          } else {
+            Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit);
+          }
+        }, gArgs.delay * 1000);
       }
     }
   },
 
   onProgressChange: function(
     aWebProgress,
     aRequest,
     aCurSelfProgress,