Backed out 4 changesets (bug 1445197) for failing mochitest devtools on multiple files e.g. devtools/client/aboutdebugging/test/browser_service_workers.js on a CLOSED TREE
authorAndreea Pavel <apavel@mozilla.com>
Wed, 18 Apr 2018 20:19:34 +0300
changeset 414336 03c304d9325beea53dad9c40b3979317b29ab475
parent 414335 83b06b648c77603202f508e14ba513940483b999
child 414337 f7db89b0787bc03e70ba0c3e1452376bcac58667
push id62842
push userapavel@mozilla.com
push dateWed, 18 Apr 2018 17:19:51 +0000
treeherderautoland@03c304d9325b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1445197
milestone61.0a1
backs out4b6f77cfd686930e3be525c51d10b825549c5eae
ba9ffea6d21695bdfff41bd32baa4a67c0a504cf
a0345830e1cfa65674eed51a56d98cccf7352f49
3e9acd2c8bd329cfeb8a53be7ecaefc462024f6c
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 4 changesets (bug 1445197) for failing mochitest devtools on multiple files e.g. devtools/client/aboutdebugging/test/browser_service_workers.js on a CLOSED TREE Backed out changeset 4b6f77cfd686 (bug 1445197) Backed out changeset ba9ffea6d216 (bug 1445197) Backed out changeset a0345830e1cf (bug 1445197) Backed out changeset 3e9acd2c8bd3 (bug 1445197)
devtools/client/aboutdebugging/components/workers/Panel.js
devtools/client/aboutdebugging/components/workers/ServiceWorkerTarget.js
devtools/client/aboutdebugging/components/workers/Target.js
devtools/client/aboutdebugging/modules/moz.build
devtools/client/aboutdebugging/modules/worker.js
devtools/client/application/application.css
devtools/client/application/index.html
devtools/client/application/initializer.js
devtools/client/application/moz.build
devtools/client/application/panel.js
devtools/client/application/src/actions/index.js
devtools/client/application/src/actions/moz.build
devtools/client/application/src/actions/workers.js
devtools/client/application/src/components/App.css
devtools/client/application/src/components/App.js
devtools/client/application/src/components/Worker.css
devtools/client/application/src/components/Worker.js
devtools/client/application/src/components/WorkerList.css
devtools/client/application/src/components/WorkerList.js
devtools/client/application/src/components/moz.build
devtools/client/application/src/constants.js
devtools/client/application/src/create-store.js
devtools/client/application/src/moz.build
devtools/client/application/src/reducers/index.js
devtools/client/application/src/reducers/moz.build
devtools/client/application/src/reducers/workers-state.js
devtools/client/definitions.js
devtools/client/framework/devtools-browser.js
devtools/client/jar.mn
devtools/client/moz.build
devtools/client/preferences/devtools-client.js
devtools/client/themes/images/tool-application.svg
devtools/shared/client/root-client.js
--- a/devtools/client/aboutdebugging/components/workers/Panel.js
+++ b/devtools/client/aboutdebugging/components/workers/Panel.js
@@ -6,16 +6,17 @@
 
 loader.lazyImporter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 const { Ci } = require("chrome");
 const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
+const { getWorkerForms } = require("../../modules/worker");
 const Services = require("Services");
 
 const PanelHeader = createFactory(require("../PanelHeader"));
 const TargetList = createFactory(require("../TargetList"));
 const WorkerTarget = createFactory(require("./Target"));
 const MultiE10SWarning = createFactory(require("./MultiE10sWarning"));
 const ServiceWorkerTarget = createFactory(require("./ServiceWorkerTarget"));
 
@@ -42,16 +43,17 @@ class WorkersPanel extends Component {
     };
   }
 
   constructor(props) {
     super(props);
 
     this.updateMultiE10S = this.updateMultiE10S.bind(this);
     this.updateWorkers = this.updateWorkers.bind(this);
+    this.getRegistrationForWorker = this.getRegistrationForWorker.bind(this);
     this.isE10S = this.isE10S.bind(this);
     this.renderServiceWorkersError = this.renderServiceWorkersError.bind(this);
 
     this.state = this.initialState;
   }
 
   componentDidMount() {
     let client = this.props.client;
@@ -103,41 +105,84 @@ class WorkersPanel extends Component {
 
   updateMultiE10S() {
     // We watch the pref but set the state based on
     // nsIXULRuntime.maxWebProcessCount.
     let processCount = Services.appinfo.maxWebProcessCount;
     this.setState({ processCount });
   }
 
-  async updateWorkers() {
+  updateWorkers() {
     let workers = this.initialState.workers;
 
-    let forms = await this.props.client.mainRoot.listAllWorkers();
+    getWorkerForms(this.props.client).then(forms => {
+      forms.registrations.forEach(form => {
+        workers.service.push({
+          icon: WorkerIcon,
+          name: form.url,
+          url: form.url,
+          scope: form.scope,
+          fetch: form.fetch,
+          registrationActor: form.actor,
+          active: form.active
+        });
+      });
 
-    workers.service = forms.serviceWorkers
-      .map(form => Object.assign({ icon: WorkerIcon, name: form.url }, form));
+      forms.workers.forEach(form => {
+        let worker = {
+          icon: WorkerIcon,
+          name: form.url,
+          url: form.url,
+          workerActor: form.actor
+        };
+        switch (form.type) {
+          case Ci.nsIWorkerDebugger.TYPE_SERVICE:
+            let registration = this.getRegistrationForWorker(form, workers.service);
+            if (registration) {
+              // XXX: Race, sometimes a ServiceWorkerRegistrationInfo doesn't
+              // have a scriptSpec, but its associated WorkerDebugger does.
+              if (!registration.url) {
+                registration.name = registration.url = form.url;
+              }
+              registration.workerActor = form.actor;
+            } else {
+              worker.fetch = form.fetch;
 
-    // Lookup shared and regular workers in forms.workers.
-    forms.workers.forEach(form => {
-      let worker = {
-        icon: WorkerIcon,
-        name: form.url,
-        url: form.url,
-        workerActor: form.actor
-      };
+              // If a service worker registration could not be found, this means we are in
+              // e10s, and registrations are not forwarded to other processes until they
+              // reach the activated state. Augment the worker as a registration worker to
+              // display it in aboutdebugging.
+              worker.scope = form.scope;
+              worker.active = false;
+              workers.service.push(worker);
+            }
+            break;
+          case Ci.nsIWorkerDebugger.TYPE_SHARED:
+            workers.shared.push(worker);
+            break;
+          default:
+            workers.other.push(worker);
+        }
+      });
 
-      if (form.type === Ci.nsIWorkerDebugger.TYPE_DEDICATED) {
-        workers.other.push(worker);
-      } else if (form.type === Ci.nsIWorkerDebugger.TYPE_SHARED) {
-        workers.shared.push(worker);
+      // XXX: Filter out the service worker registrations for which we couldn't
+      // find the scriptSpec.
+      workers.service = workers.service.filter(reg => !!reg.url);
+
+      this.setState({ workers });
+    });
+  }
+
+  getRegistrationForWorker(form, registrations) {
+    for (let registration of registrations) {
+      if (registration.scope === form.scope) {
+        return registration;
       }
-    });
-
-    this.setState({ workers });
+    }
+    return null;
   }
 
   isE10S() {
     return Services.appinfo.browserTabsRemoteAutostart;
   }
 
   renderServiceWorkersError() {
     let isWindowPrivate = PrivateBrowsingUtils.isContentWindowPrivate(window);
--- a/devtools/client/aboutdebugging/components/workers/ServiceWorkerTarget.js
+++ b/devtools/client/aboutdebugging/components/workers/ServiceWorkerTarget.js
@@ -4,22 +4,21 @@
 
 /* eslint-env browser */
 
 "use strict";
 
 const { Component } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
+const { debugWorker } = require("../../modules/worker");
 const Services = require("Services");
 
 loader.lazyRequireGetter(this, "DebuggerClient",
   "devtools/shared/client/debugger-client", true);
-loader.lazyRequireGetter(this, "gDevToolsBrowser",
-  "devtools/client/framework/devtools-browser", true);
 
 const Strings = Services.strings.createBundle(
   "chrome://devtools/locale/aboutdebugging.properties");
 
 class ServiceWorkerTarget extends Component {
   static get propTypes() {
     return {
       client: PropTypes.instanceOf(DebuggerClient).isRequired,
@@ -81,17 +80,17 @@ class ServiceWorkerTarget extends Compon
 
   debug() {
     if (!this.isRunning()) {
       // If the worker is not running, we can't debug it.
       return;
     }
 
     let { client, target } = this.props;
-    gDevToolsBrowser.openWorkerToolbox(client, target.workerActor);
+    debugWorker(client, target.workerActor);
   }
 
   push() {
     if (!this.isActive() || !this.isRunning()) {
       // If the worker is not running, we can't push to it.
       // If the worker is not active, the registration might be unavailable and the
       // push will not succeed.
       return;
--- a/devtools/client/aboutdebugging/components/workers/Target.js
+++ b/devtools/client/aboutdebugging/components/workers/Target.js
@@ -4,22 +4,21 @@
 
 /* eslint-env browser */
 
 "use strict";
 
 const { Component } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
+const { debugWorker } = require("../../modules/worker");
 const Services = require("Services");
 
 loader.lazyRequireGetter(this, "DebuggerClient",
   "devtools/shared/client/debugger-client", true);
-loader.lazyRequireGetter(this, "gDevToolsBrowser",
-  "devtools/client/framework/devtools-browser", true);
 
 const Strings = Services.strings.createBundle(
   "chrome://devtools/locale/aboutdebugging.properties");
 
 class WorkerTarget extends Component {
   static get propTypes() {
     return {
       client: PropTypes.instanceOf(DebuggerClient).isRequired,
@@ -34,17 +33,17 @@ class WorkerTarget extends Component {
 
   constructor(props) {
     super(props);
     this.debug = this.debug.bind(this);
   }
 
   debug() {
     let { client, target } = this.props;
-    gDevToolsBrowser.openWorkerToolbox(client, target.workerActor);
+    debugWorker(client, target.workerActor);
   }
 
   render() {
     let { target, debugDisabled } = this.props;
 
     return dom.li({ className: "target-container" },
       dom.img({
         className: "target-icon",
--- a/devtools/client/aboutdebugging/modules/moz.build
+++ b/devtools/client/aboutdebugging/modules/moz.build
@@ -1,8 +1,9 @@
 # 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/.
 
 DevToolsModules(
     'addon.js',
     'connect.js',
+    'worker.js',
 )
new file mode 100644
--- /dev/null
+++ b/devtools/client/aboutdebugging/modules/worker.js
@@ -0,0 +1,75 @@
+/* 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/. */
+
+"use strict";
+
+loader.lazyRequireGetter(this, "gDevTools",
+  "devtools/client/framework/devtools", true);
+loader.lazyRequireGetter(this, "TargetFactory",
+  "devtools/client/framework/target", true);
+loader.lazyRequireGetter(this, "Toolbox",
+  "devtools/client/framework/toolbox", true);
+
+/**
+ * Open a window-hosted toolbox to debug the worker associated to the provided
+ * worker actor.
+ *
+ * @param {DebuggerClient} client
+ * @param {Object} workerActor
+ *        worker actor form to debug
+ */
+exports.debugWorker = function(client, workerActor) {
+  client.attachWorker(workerActor, (response, workerClient) => {
+    let workerTarget = TargetFactory.forWorker(workerClient);
+    gDevTools.showToolbox(workerTarget, "jsdebugger", Toolbox.HostType.WINDOW)
+      .then(toolbox => {
+        toolbox.once("destroy", () => workerClient.detach());
+      });
+  });
+};
+
+/**
+ * Retrieve all service worker registrations as well as workers from the parent
+ * and child processes.
+ *
+ * @param {DebuggerClient} client
+ * @return {Object}
+ *         - {Array} registrations
+ *           Array of ServiceWorkerRegistrationActor forms
+ *         - {Array} workers
+ *           Array of WorkerActor forms
+ */
+exports.getWorkerForms = async function(client) {
+  let registrations = [];
+  let workers = [];
+
+  try {
+    // List service worker registrations
+    ({ registrations } =
+      await client.mainRoot.listServiceWorkerRegistrations());
+
+    // List workers from the Parent process
+    ({ workers } = await client.mainRoot.listWorkers());
+
+    // And then from the Child processes
+    let { processes } = await client.mainRoot.listProcesses();
+    for (let process of processes) {
+      // Ignore parent process
+      if (process.parent) {
+        continue;
+      }
+      let { form } = await client.getProcess(process.id);
+      let processActor = form.actor;
+      let response = await client.request({
+        to: processActor,
+        type: "listWorkers"
+      });
+      workers = workers.concat(response.workers);
+    }
+  } catch (e) {
+    // Something went wrong, maybe our client is disconnected?
+  }
+
+  return { registrations, workers };
+};
deleted file mode 100644
--- a/devtools/client/application/application.css
+++ /dev/null
@@ -1,23 +0,0 @@
-/* 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/. */
-
-@import "resource://devtools/client/application/src/components/App.css";
-@import "resource://devtools/client/application/src/components/Worker.css";
-@import "resource://devtools/client/application/src/components/WorkerList.css";
-
-* {
-  box-sizing: border-box;
-}
-
-html,
-body,
-#mount {
-  height: 100%;
-}
-
-ul {
-  list-style: none;
-  margin: 0;
-  padding: 0;
-}
\ No newline at end of file
deleted file mode 100644
--- a/devtools/client/application/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!-- 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/. -->
-<!DOCTYPE html>
-<html dir="">
-  <head>
-    <link rel="stylesheet" type="text/css" href="resource://devtools/client/application/application.css" />
-  </head>
-  <body class="theme-body" role="application">
-    <div id="mount"></div>
-    <script src="chrome://devtools/content/shared/theme-switching.js"></script>
-    <script src="initializer.js"></script>
-  </body>
-</html>
deleted file mode 100644
--- a/devtools/client/application/initializer.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const { BrowserLoader } = ChromeUtils.import("resource://devtools/client/shared/browser-loader.js", {});
-const require = BrowserLoader({
-  baseURI: "resource://devtools/client/application/",
-  window,
-}).require;
-
-const { createFactory } = require("devtools/client/shared/vendor/react");
-const { render, unmountComponentAtNode } = require("devtools/client/shared/vendor/react-dom");
-const Provider = createFactory(require("devtools/client/shared/vendor/react-redux").Provider);
-const { bindActionCreators } = require("devtools/client/shared/vendor/redux");
-
-const { configureStore } = require("./src/create-store");
-const actions = require("./src/actions/index");
-
-const App = createFactory(require("./src/components/App"));
-
-/**
- * Global Application object in this panel. This object is expected by panel.js and is
- * called to start the UI for the panel.
- */
-window.Application = {
-  async bootstrap({ toolbox, panel }) {
-    this.updateWorkers = this.updateWorkers.bind(this);
-
-    this.mount = document.querySelector("#mount");
-    this.toolbox = toolbox;
-    this.client = toolbox.target.client;
-
-    this.store = configureStore();
-    this.actions = bindActionCreators(actions, this.store.dispatch);
-
-    const serviceContainer = {
-      openAboutDebugging() {
-        let win = toolbox.doc.defaultView.top;
-        win.openUILinkIn("about:debugging#workers", "tab", { relatedToCurrent: true });
-      }
-    };
-
-    // Render the root Application component.
-    const app = App({ client: this.client, serviceContainer });
-    render(Provider({ store: this.store }, app), this.mount);
-
-    this.client.addListener("workerListChanged", this.updateWorkers);
-    this.client.addListener("serviceWorkerRegistrationListChanged", this.updateWorkers);
-    this.client.addListener("registration-changed", this.updateWorkers);
-    this.client.addListener("processListChanged", this.updateWorkers);
-
-    await this.updateWorkers();
-  },
-
-  async updateWorkers() {
-    let { serviceWorkers } = await this.client.mainRoot.listAllWorkers();
-    this.actions.updateWorkers(serviceWorkers);
-  },
-
-  destroy() {
-    this.client.removeListener("workerListChanged", this.updateWorkers);
-    this.client.removeListener("serviceWorkerRegistrationListChanged",
-      this.updateWorkers);
-    this.client.removeListener("registration-changed", this.updateWorkers);
-    this.client.removeListener("processListChanged", this.updateWorkers);
-
-    unmountComponentAtNode(this.mount);
-    this.mount = null;
-    this.toolbox = null;
-    this.client = null;
-  },
-};
deleted file mode 100644
--- a/devtools/client/application/moz.build
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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/.
-
-DIRS += [
-    'src',
-]
-
-DevToolsModules(
-    'application.css',
-    'panel.js'
-)
deleted file mode 100644
--- a/devtools/client/application/panel.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-/**
- * DevTools panel responsible for the application tool, which lists and allows to debug
- * service workers.
- */
-class ApplicationPanel {
-  /**
-   * Constructor.
-   *
-   * @param {Window} panelWin
-   *        The frame/window dedicated to this panel.
-   * @param {Toolbox} toolbox
-   *        The toolbox instance responsible for this panel.
-   */
-  constructor(panelWin, toolbox) {
-    this.panelWin = panelWin;
-    this.toolbox = toolbox;
-  }
-
-  async open() {
-    if (!this.toolbox.target.isRemote) {
-      await this.toolbox.target.makeRemote();
-    }
-
-    this.panelWin.Application.bootstrap({
-      toolbox: this.toolbox,
-      panel: this,
-    });
-    this.emit("ready");
-    this.isReady = true;
-    return this;
-  }
-
-  destroy() {
-    this.panelWin.Application.destroy();
-    this.panelWin = null;
-    this.toolbox = null;
-    this.emit("destroyed");
-
-    return this;
-  }
-}
-
-exports.ApplicationPanel = ApplicationPanel;
deleted file mode 100644
--- a/devtools/client/application/src/actions/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const workers = require("./workers");
-
-Object.assign(exports,
-  workers,
-);
deleted file mode 100644
--- a/devtools/client/application/src/actions/moz.build
+++ /dev/null
@@ -1,8 +0,0 @@
-# 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/.
-
-DevToolsModules(
-    'index.js',
-    'workers.js',
-)
deleted file mode 100644
--- a/devtools/client/application/src/actions/workers.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const {
-  UPDATE_WORKERS,
-} = require("../constants");
-
-function updateWorkers(workers) {
-  return {
-    type: UPDATE_WORKERS,
-    workers
-  };
-}
-
-module.exports = {
-  updateWorkers,
-};
deleted file mode 100644
--- a/devtools/client/application/src/components/App.css
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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/. */
-
-/*
- * The current layout of the application panel is
- *
- *  +---------------------------------------------+
- *  | (header) "Service workers"                  |
- *  +---------------------------------------------+
- *  | Service worker 1                            |
- *  |   (...)                                     |
- *  | Service worker N           (see Worker.css) |
- *  +---------------------------------------------+
- *  |                     Link to about:debugging |
- *  +---------------------------------------------+
- */
-.application {
-  height: 100%;
-  padding: 0 0 0 20px;
-  overflow: auto;
-  display: flex;
-  flex-direction: column;
-}
-
-h1 {
-  font-size: 22px;
-  font-weight: normal;
-}
-
-a,
-a:hover,
-a:visited {
-  color: var(--blue-60) !important;
-  margin: 0 10px;
-  cursor: pointer;
-}
-
-a.disabled,
-a.disabled:hover,
-a.disabled:visited {
-  color: var(--grey-30) !important;
-  cursor: default;
-}
deleted file mode 100644
--- a/devtools/client/application/src/components/App.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { createFactory, Component } = require("devtools/client/shared/vendor/react");
-const { connect } = require("devtools/client/shared/vendor/react-redux");
-const { div } = require("devtools/client/shared/vendor/react-dom-factories");
-
-const WorkerList = createFactory(require("./WorkerList"));
-
-/**
- * This is the main component for the application panel.
- */
-class App extends Component {
-  static get propTypes() {
-    return {
-      client: PropTypes.object.isRequired,
-      workers: PropTypes.object.isRequired,
-      serviceContainer: PropTypes.object.isRequired,
-    };
-  }
-
-  render() {
-    let { workers, client, serviceContainer } = this.props;
-
-    return div({className: "application"},
-      WorkerList({ workers, client, serviceContainer }));
-  }
-}
-
-// Exports
-
-module.exports = connect(
-  (state) => ({ workers: state.workers.list }),
-)(App);
deleted file mode 100644
--- a/devtools/client/application/src/components/Worker.css
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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/. */
-
- /*
- * The current layout of a service worker item is
- *
- *  +----------------------------+----------------+
- *  | Service worker scope       | Unregister btn |
- *  +---+----------+-------------+----------------|
- *  |   | "Source" | script name | debug link     |
- *  |   |----------+-------------+----------------|
- *  |   | "Status" | status      | start link     |
- *  +---+----------+-------------+----------------|
- */
-.service-worker-container {
-  margin-bottom: 20px;
-  width: 100%;
-  max-width: 600px;
-  position: relative;
-  line-height: 1.5;
-  font-size: 13px;
-}
-
-.service-worker-container > .service-worker-scope {
-  padding-inline-start: 30px;
-}
-
-.service-worker-container > :not(.service-worker-scope) {
-  padding-inline-start: 70px;
-}
-
-.service-worker-scope {
-  font-weight: bold;
-}
-
-.service-worker-meta-name {
-  color: var(--grey-50);
-  min-width: 50px;
-  margin-inline-end: 10px;
-  display: inline-block;
-}
-
-.unregister-button {
-  position: absolute;
-  right: 0;
-}
deleted file mode 100644
--- a/devtools/client/application/src/components/Worker.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const { Component } = require("devtools/client/shared/vendor/react");
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { a, button, div, li, span } = require("devtools/client/shared/vendor/react-dom-factories");
-const Services = require("Services");
-
-loader.lazyRequireGetter(this, "DebuggerClient",
-  "devtools/shared/client/debugger-client", true);
-loader.lazyRequireGetter(this, "gDevToolsBrowser",
-  "devtools/client/framework/devtools-browser", true);
-
-const Strings = Services.strings.createBundle(
-  "chrome://devtools/locale/aboutdebugging.properties");
-
-/**
- * This component is dedicated to display a worker, more accurately a service worker, in
- * the list of workers displayed in the application panel. It displays information about
- * the worker as well as action links and buttons to interact with the worker (e.g. debug,
- * unregister, update etc...).
- */
-class Worker extends Component {
-  static get propTypes() {
-    return {
-      client: PropTypes.instanceOf(DebuggerClient).isRequired,
-      debugDisabled: PropTypes.bool,
-      worker: PropTypes.shape({
-        active: PropTypes.bool,
-        name: PropTypes.string.isRequired,
-        scope: PropTypes.string.isRequired,
-        // registrationActor can be missing in e10s.
-        registrationActor: PropTypes.string,
-        workerActor: PropTypes.string
-      }).isRequired
-    };
-  }
-
-  constructor(props) {
-    super(props);
-
-    this.debug = this.debug.bind(this);
-    this.start = this.start.bind(this);
-    this.unregister = this.unregister.bind(this);
-  }
-
-  debug() {
-    if (!this.isRunning()) {
-      console.log("Service workers cannot be debugged if they are not running");
-      return;
-    }
-
-    let { client, worker } = this.props;
-    gDevToolsBrowser.openWorkerToolbox(client, worker.workerActor);
-  }
-
-  start() {
-    if (!this.isActive() || this.isRunning()) {
-      console.log("Running or inactive service workers cannot be started");
-      return;
-    }
-
-    let { client, worker } = this.props;
-    client.request({
-      to: worker.registrationActor,
-      type: "start"
-    });
-  }
-
-  unregister() {
-    let { client, worker } = this.props;
-    client.request({
-      to: worker.registrationActor,
-      type: "unregister"
-    });
-  }
-
-  isRunning() {
-    // We know the worker is running if it has a worker actor.
-    return !!this.props.worker.workerActor;
-  }
-
-  isActive() {
-    return this.props.worker.active;
-  }
-
-  getServiceWorkerStatus() {
-    if (this.isActive() && this.isRunning()) {
-      return "running";
-    } else if (this.isActive()) {
-      return "stopped";
-    }
-    // We cannot get service worker registrations unless the registration is in
-    // ACTIVE state. Unable to know the actual state ("installing", "waiting"), we
-    // display a custom state "registering" for now. See Bug 1153292.
-    return "registering";
-  }
-
-  formatScope(scope) {
-    let [, remainder] = scope.split("://");
-    return remainder || scope;
-  }
-
-  formatSource(source) {
-    let parts = source.split("/");
-    return parts[parts.length - 1];
-  }
-
-  render() {
-    let { worker } = this.props;
-    let status = this.getServiceWorkerStatus();
-
-    const unregisterButton = this.isActive() ?
-      button({
-        onClick: this.unregister,
-        className: "devtools-button unregister-button",
-        "data-standalone": true
-      },
-        Strings.GetStringFromName("unregister"))
-      : null;
-
-    const debugLinkDisabled = this.isRunning() ? "" : "disabled";
-    const debugLink = a({
-      onClick: this.isRunning() ? this.debug : null,
-      title: this.isRunning() ? null : "Only running service workers can be debugged",
-      className: `${debugLinkDisabled} debug-link`
-    },
-      Strings.GetStringFromName("debug"));
-
-    const startLink = !this.isRunning() ?
-      a({ onClick: this.start, className: "start-link" },
-        Strings.GetStringFromName("start"))
-      : null;
-
-    return li({ className: "service-worker-container" },
-      div(
-        { className: "service-worker-scope" },
-        span({ title: worker.scope }, this.formatScope(worker.scope)),
-        unregisterButton),
-      div(
-        { className: "service-worker-source" },
-        span({ className: "service-worker-meta-name" }, "Source"),
-        span({ title: worker.scope }, this.formatSource(worker.url)),
-        debugLink),
-      div(
-        { className: `service-worker-status service-worker-status-${status}` },
-        span({ className: "service-worker-meta-name" }, "Status"),
-        Strings.GetStringFromName(status).toLowerCase(),
-        startLink)
-    );
-  }
-}
-
-module.exports = Worker;
deleted file mode 100644
--- a/devtools/client/application/src/components/WorkerList.css
+++ /dev/null
@@ -1,12 +0,0 @@
-/* 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/. */
-
-.application-aboutdebugging-plug {
-  text-align: right;
-  padding: 5px 0;
-}
-
-.application-workers-container {
-  flex-grow: 1;
-}
deleted file mode 100644
--- a/devtools/client/application/src/components/WorkerList.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { createFactory, Component } = require("devtools/client/shared/vendor/react");
-const { a, div, h1, ul, li } = require("devtools/client/shared/vendor/react-dom-factories");
-const Worker = createFactory(require("./Worker"));
-
-/**
- * This component handles the list of service workers displayed in the application panel
- * and also displays a suggestion to use about debugging for debugging other service
- * workers.
- */
-class WorkerList extends Component {
-  static get propTypes() {
-    return {
-      client: PropTypes.object.isRequired,
-      workers: PropTypes.object.isRequired,
-      serviceContainer: PropTypes.object.isRequired,
-    };
-  }
-
-  render() {
-    const { workers, client, serviceContainer } = this.props;
-    const { openAboutDebugging } = serviceContainer;
-
-    return [
-      ul({ className: "application-workers-container" },
-        li({},
-          h1({ className: "application-title" }, "Service Workers")
-        ),
-        workers.map(worker => Worker({
-          client,
-          debugDisabled: false,
-          worker,
-        }))
-      ),
-      div({ className: "application-aboutdebugging-plug" },
-        "See about:debugging for Service Workers from other domains",
-        a({ onClick: () => openAboutDebugging() }, "Open about:debugging")
-      )
-    ];
-  }
-}
-
-// Exports
-
-module.exports = WorkerList;
deleted file mode 100644
--- a/devtools/client/application/src/components/moz.build
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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/.
-
-DevToolsModules(
-    'App.css',
-    'App.js',
-    'Worker.css',
-    'Worker.js',
-    'WorkerList.css',
-    'WorkerList.js',
-)
deleted file mode 100644
--- a/devtools/client/application/src/constants.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const actionTypes = {
-  UPDATE_WORKERS: "UPDATE_WORKERS",
-};
-
-// flatten constants
-module.exports = Object.assign({}, actionTypes);
deleted file mode 100644
--- a/devtools/client/application/src/create-store.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const { createStore } = require("devtools/client/shared/vendor/redux");
-
-// Reducers
-const rootReducer = require("./reducers/index");
-const { WorkersState } = require("./reducers/workers-state");
-
-function configureStore() {
-  // Prepare initial state.
-  const initialState = {
-    workers: new WorkersState(),
-  };
-
-  return createStore(rootReducer, initialState);
-}
-
-exports.configureStore = configureStore;
deleted file mode 100644
--- a/devtools/client/application/src/moz.build
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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/.
-
-DIRS += [
-    'actions',
-    'components',
-    'reducers',
-]
-
-DevToolsModules(
-    'constants.js',
-    'create-store.js',
-)
deleted file mode 100644
--- a/devtools/client/application/src/reducers/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const { combineReducers } = require("devtools/client/shared/vendor/redux");
-const { workersReducer } = require("./workers-state");
-
-module.exports = combineReducers({
-  workers: workersReducer,
-});
deleted file mode 100644
--- a/devtools/client/application/src/reducers/moz.build
+++ /dev/null
@@ -1,8 +0,0 @@
-# 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/.
-
-DevToolsModules(
-    'index.js',
-    'workers-state.js',
-)
deleted file mode 100644
--- a/devtools/client/application/src/reducers/workers-state.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const {
-  UPDATE_WORKERS,
-} = require("../constants");
-
-function WorkersState() {
-  return {
-    // Array of all service workers
-    list: [],
-  };
-}
-
-function workersReducer(state = WorkersState(), action) {
-  switch (action.type) {
-    case UPDATE_WORKERS: {
-      let { workers } = action;
-      return { list: workers };
-    }
-
-    default:
-      return state;
-  }
-}
-
-module.exports = {
-  WorkersState,
-  workersReducer,
-};
--- a/devtools/client/definitions.js
+++ b/devtools/client/definitions.js
@@ -20,17 +20,16 @@ loader.lazyGetter(this, "WebAudioEditorP
 loader.lazyGetter(this, "MemoryPanel", () => require("devtools/client/memory/panel").MemoryPanel);
 loader.lazyGetter(this, "PerformancePanel", () => require("devtools/client/performance/panel").PerformancePanel);
 loader.lazyGetter(this, "NewPerformancePanel", () => require("devtools/client/performance-new/panel").PerformancePanel);
 loader.lazyGetter(this, "NetMonitorPanel", () => require("devtools/client/netmonitor/panel").NetMonitorPanel);
 loader.lazyGetter(this, "StoragePanel", () => require("devtools/client/storage/panel").StoragePanel);
 loader.lazyGetter(this, "ScratchpadPanel", () => require("devtools/client/scratchpad/scratchpad-panel").ScratchpadPanel);
 loader.lazyGetter(this, "DomPanel", () => require("devtools/client/dom/dom-panel").DomPanel);
 loader.lazyGetter(this, "AccessibilityPanel", () => require("devtools/client/accessibility/accessibility-panel").AccessibilityPanel);
-loader.lazyGetter(this, "ApplicationPanel", () => require("devtools/client/application/panel").ApplicationPanel);
 
 // Other dependencies
 loader.lazyRequireGetter(this, "CommandUtils", "devtools/client/shared/developer-toolbar", true);
 loader.lazyRequireGetter(this, "CommandState", "devtools/shared/gcli/command-state", true);
 loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true);
 loader.lazyImporter(this, "ScratchpadManager", "resource://devtools/client/scratchpad/scratchpad-manager.jsm");
 
 const {MultiLocalizationHelper} = require("devtools/shared/l10n");
@@ -440,54 +439,32 @@ Tools.accessibility = {
     return target.hasActor("accessibility");
   },
 
   build(iframeWindow, toolbox) {
     return new AccessibilityPanel(iframeWindow, toolbox);
   }
 };
 
-Tools.application = {
-  id: "application",
-  ordinal: 15,
-  visibilityswitch: "devtools.application.enabled",
-  icon: "chrome://devtools/skin/images/tool-application.svg",
-  url: "chrome://devtools/content/application/index.html",
-  label: "Application",
-  panelLabel: "Application",
-  tooltip: "Application",
-  inMenu: false,
-  hiddenInOptions: true,
-
-  isTargetSupported: function(target) {
-    return target.isLocalTab;
-  },
-
-  build: function(iframeWindow, toolbox) {
-    return new ApplicationPanel(iframeWindow, toolbox);
-  }
-};
-
 var defaultTools = [
   Tools.options,
   Tools.webConsole,
   Tools.inspector,
   Tools.jsdebugger,
   Tools.styleEditor,
   Tools.shaderEditor,
   Tools.canvasDebugger,
   Tools.webAudioEditor,
   Tools.performance,
   Tools.netMonitor,
   Tools.storage,
   Tools.scratchpad,
   Tools.memory,
   Tools.dom,
   Tools.accessibility,
-  Tools.application,
 ];
 
 exports.defaultTools = defaultTools;
 
 Tools.darkTheme = {
   id: "dark",
   label: l10n("options.darkTheme.label2"),
   ordinal: 1,
--- a/devtools/client/framework/devtools-browser.js
+++ b/devtools/client/framework/devtools-browser.js
@@ -384,34 +384,16 @@ var gDevToolsBrowser = exports.gDevTools
     }
 
     let msg = L10N.getStr("toolbox.noContentProcessForTab.message");
     Services.prompt.alert(null, "", msg);
     return Promise.reject(msg);
   },
 
   /**
-   * Open a window-hosted toolbox to debug the worker associated to the provided
-   * worker actor.
-   *
-   * @param  {DebuggerClient} client
-   * @param  {Object} workerActor
-   *         worker actor form to debug
-   */
-  openWorkerToolbox(client, workerActor) {
-    client.attachWorker(workerActor, (response, workerClient) => {
-      let workerTarget = TargetFactory.forWorker(workerClient);
-      gDevTools.showToolbox(workerTarget, null, Toolbox.HostType.WINDOW)
-        .then(toolbox => {
-          toolbox.once("destroy", () => workerClient.detach());
-        });
-    });
-  },
-
-  /**
    * Install WebIDE widget
    */
   // Used by itself
   installWebIDEWidget() {
     if (this.isWebIDEWidgetInstalled()) {
       return;
     }
 
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -218,17 +218,16 @@ devtools.jar:
     skin/images/tool-storage.svg (themes/images/tool-storage.svg)
     skin/images/tool-profiler.svg (themes/images/tool-profiler.svg)
     skin/images/tool-network.svg (themes/images/tool-network.svg)
     skin/images/tool-scratchpad.svg (themes/images/tool-scratchpad.svg)
     skin/images/tool-webaudio.svg (themes/images/tool-webaudio.svg)
     skin/images/tool-memory.svg (themes/images/tool-memory.svg)
     skin/images/tool-dom.svg (themes/images/tool-dom.svg)
     skin/images/tool-accessibility.svg (themes/images/tool-accessibility.svg)
-    skin/images/tool-application.svg (themes/images/tool-application.svg)
     skin/images/close.svg (themes/images/close.svg)
     skin/images/clear.svg (themes/images/clear.svg)
     skin/images/vview-delete.png (themes/images/vview-delete.png)
     skin/images/vview-delete@2x.png (themes/images/vview-delete@2x.png)
     skin/images/vview-edit.png (themes/images/vview-edit.png)
     skin/images/vview-edit@2x.png (themes/images/vview-edit@2x.png)
     skin/images/vview-lock.png (themes/images/vview-lock.png)
     skin/images/vview-lock@2x.png (themes/images/vview-lock@2x.png)
@@ -297,18 +296,14 @@ devtools.jar:
     content/netmonitor/src/assets/styles/StatisticsPanel.css (netmonitor/src/assets/styles/StatisticsPanel.css)
     content/netmonitor/src/assets/styles/StatusBar.css (netmonitor/src/assets/styles/StatusBar.css)
     content/netmonitor/src/assets/styles/Toolbar.css (netmonitor/src/assets/styles/Toolbar.css)
     content/netmonitor/src/assets/styles/variables.css (netmonitor/src/assets/styles/variables.css)
     content/netmonitor/src/assets/icons/play.svg (netmonitor/src/assets/icons/play.svg)
     content/netmonitor/index.html (netmonitor/index.html)
     content/netmonitor/initializer.js (netmonitor/initializer.js)
 
-    # Application panel
-    content/application/index.html (application/index.html)
-    content/application/initializer.js (application/initializer.js)
-
     # Devtools-components
     skin/images/devtools-components/arrow.svg (themes/images/devtools-components/arrow.svg)
 
     # Devtools-reps
     skin/images/devtools-reps/jump-definition.svg (themes/images/devtools-reps/jump-definition.svg)
     skin/images/devtools-reps/open-inspector.svg (themes/images/devtools-reps/open-inspector.svg)
--- a/devtools/client/moz.build
+++ b/devtools/client/moz.build
@@ -5,17 +5,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include('../templates.mozbuild')
 
 DIRS += [
     'aboutdebugging',
     'accessibility',
     'animationinspector',
-    'application',
     'canvasdebugger',
     'commandline',
     'debugger',
     'dom',
     'framework',
     'inspector',
     'jsonview',
     'locales',
--- a/devtools/client/preferences/devtools-client.js
+++ b/devtools/client/preferences/devtools-client.js
@@ -158,19 +158,16 @@ pref("devtools.performance.ui.experiment
 pref("devtools.cache.disabled", false);
 
 // The default service workers UI setting
 pref("devtools.serviceWorkers.testing.enabled", false);
 
 // Enable the Network Monitor
 pref("devtools.netmonitor.enabled", true);
 
-// Enable the Application panel
-pref("devtools.application.enabled", false);
-
 // The default Network Monitor UI settings
 pref("devtools.netmonitor.panes-network-details-width", 550);
 pref("devtools.netmonitor.panes-network-details-height", 450);
 pref("devtools.netmonitor.filters", "[\"all\"]");
 pref("devtools.netmonitor.visibleColumns",
   "[\"status\",\"method\",\"file\",\"domain\",\"cause\",\"type\",\"transferred\",\"contentSize\",\"waterfall\"]"
 );
 
deleted file mode 100644
--- a/devtools/client/themes/images/tool-application.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- 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/. -->
-<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" stroke="context-fill #0b0b0b">
-  <rect x="1.5" y="1.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-  <rect x="6.5" y="1.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-  <rect x="11.5" y="1.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-
-  <rect x="1.5" y="6.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-  <rect x="6.5" y="6.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-  <rect x="11.5" y="6.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-
-  <rect x="1.5" y="11.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-  <rect x="6.5" y="11.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-  <rect x="11.5" y="11.5" width="3" height="3" fill="transparent" stroke-width="1"/>
-</svg>
\ No newline at end of file
--- a/devtools/shared/client/root-client.js
+++ b/devtools/shared/client/root-client.js
@@ -2,18 +2,16 @@
  * 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/. */
 
 "use strict";
 
 const { Ci } = require("chrome");
 const { arg, DebuggerClient } = require("devtools/shared/client/debugger-client");
 
-const TYPE_SERVICE = Ci.nsIWorkerDebugger.TYPE_SERVICE;
-
 /**
  * A RootClient object represents a root actor on the server. Each
  * DebuggerClient keeps a RootClient instance representing the root actor
  * for the initial connection; DebuggerClient's 'listTabs' and
  * 'listChildProcesses' methods forward to that root actor.
  *
  * @param client object
  *      The client connection to which this actor belongs.
@@ -157,135 +155,16 @@ RootClient.prototype = {
       type: "getWindow",
       outerWindowID,
     };
 
     return this.request(packet);
   },
 
   /**
-   * Retrieve the service worker registrations currently available for the this client.
-   *
-   * @param  {Form} forms
-   *         All available worker forms
-   * @return {Array} array of form-like objects dedicated to service workers:
-   *         - {String} url: url of the worker
-   *         - {String} scope: scope controlled by this worker
-   *         - {String} fetch: fetch url if available
-   *         - {Boolean} active: is the service worker active
-   *         - {String} registrationActor: id of the registration actor, needed to start,
-   *           unregister and get push information for the registation. Available on
-   *           active service workers only in e10s.
-   *         - {String} workerActor: id of the worker actor, needed to debug and send push
-   *           notifications.
-   */
-  _mergeServiceWorkerForms: async function(workers) {
-    // List service worker registrations
-    let { registrations } = await this.listServiceWorkerRegistrations();
-
-    // registrations contain only service worker registrations, add each registration
-    // to the workers array.
-    let fromRegistrations = registrations.map(form => {
-      return {
-        url: form.url,
-        scope: form.scope,
-        fetch: form.fetch,
-        active: form.active,
-        registrationActor: form.actor,
-      };
-    });
-
-    // Loop on workers to retrieve the worker actor corresponding to the current
-    // instance of the service worker if available.
-    let fromWorkers = [];
-    workers
-      .filter(form => form.type === TYPE_SERVICE)
-      .forEach(form => {
-        let registration = fromRegistrations.find(w => w.scope === form.scope);
-        if (registration) {
-          if (!registration.url) {
-            // XXX: Race, sometimes a ServiceWorkerRegistrationInfo doesn't
-            // have a scriptSpec, but its associated WorkerDebugger does.
-            registration.url = form.url;
-          }
-          // Add the worker actor as "workerActor" on the registration.
-          registration.workerActor = form.actor;
-        } else {
-          // If a service worker registration could not be found, this means we are in
-          // e10s, and registrations are not forwarded to other processes until they
-          // reach the activated state.
-          fromWorkers.push({
-            url: form.url,
-            scope: form.scope,
-            fetch: form.fetch,
-            // Infer active=false since the service worker is not supposed to be
-            // registered yet in this edge case.
-            active: false,
-            workerActor: form.actor,
-          });
-        }
-      });
-
-    // Concatenate service workers found in forms.registrations and forms.workers.
-    let combined = [...fromRegistrations, ...fromWorkers];
-
-    // Filter out service workers missing a url.
-    return combined.filter(form => !!form.url);
-  },
-
-  /**
-   * Retrieve all service worker registrations as well as workers from the parent
-   * and child processes. Listing service workers involves merging information coming from
-   * registrations and workers, this method will combine this information to present a
-   * unified array of serviceWorkers. If you are only interested in other workers, use
-   * listWorkers.
-   *
-   * @return {Object}
-   *         - {Array} serviceWorkers
-   *           array of form-like objects for serviceworkers (cf _mergeServiceWorkerForms)
-   *         - {Array} workers
-   *           Array of WorkerActor forms, containing all possible workers.
-   */
-  listAllWorkers: async function() {
-    let workers = [];
-
-    try {
-      // List workers from the Parent process
-      ({ workers } = await this.listWorkers());
-
-      // And then from the Child processes
-      let { processes } = await this.listProcesses();
-      for (let process of processes) {
-        // Ignore parent process
-        if (process.parent) {
-          continue;
-        }
-        let { form } = await this._client.getProcess(process.id);
-        let processActor = form.actor;
-        let response = await this._client.request({
-          to: processActor,
-          type: "listWorkers"
-        });
-        workers = workers.concat(response.workers);
-      }
-    } catch (e) {
-      console.warn("Error while listing all workers, is the client disconnected?", e);
-    }
-
-    // Combine information from registrations and workers to create a usable list of
-    // workers for consumer code.
-    let serviceWorkers = await this._mergeServiceWorkerForms(workers);
-
-    return {
-      serviceWorkers,
-      workers
-    };
-  },
-
-  /**
    * Description of protocol's actors and methods.
    *
    * @param function onResponse
    *        Called with the response packet.
    */
   protocolDescription: DebuggerClient.requester({ type: "protocolDescription" }),
 
   /*