Bug 1482070 - Move DocumentEventsListener to its own file. r=Honza
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 14 Aug 2018 08:14:04 -0700
changeset 432399 f269b019428d8d9e2984c8345d3fd9e40d013b8d
parent 432398 5b6d222516808471f3e435b151f29dd51b587a19
child 432400 cc2fffaa4633bebab54f78e42277e8eeb23521c6
push id106726
push userapoirot@mozilla.com
push dateMon, 20 Aug 2018 16:07:22 +0000
treeherdermozilla-inbound@68bff34cbddd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1482070
milestone63.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 1482070 - Move DocumentEventsListener to its own file. r=Honza Summary: Depends On D3601 Reviewers: Honza! Tags: #secure-revision Bug #: 1482070 Differential Revision: https://phabricator.services.mozilla.com/D3602 MozReview-Commit-ID: 2ksi5eir4mb
devtools/server/actors/webconsole.js
devtools/server/actors/webconsole/listeners.js
devtools/server/actors/webconsole/listeners/document-events.js
devtools/server/actors/webconsole/listeners/moz.build
devtools/server/actors/webconsole/moz.build
--- a/devtools/server/actors/webconsole.js
+++ b/devtools/server/actors/webconsole.js
@@ -41,17 +41,17 @@ loader.lazyRequireGetter(this, "EventEmi
 if (isWorker) {
   loader.lazyRequireGetter(this, "ConsoleAPIListener", "devtools/server/actors/webconsole/worker-listeners", true);
   loader.lazyRequireGetter(this, "ConsoleServiceListener", "devtools/server/actors/webconsole/worker-listeners", true);
 } else {
   loader.lazyRequireGetter(this, "ConsoleAPIListener", "devtools/server/actors/webconsole/listeners/console-api", true);
   loader.lazyRequireGetter(this, "ConsoleServiceListener", "devtools/server/actors/webconsole/listeners/console-service", true);
   loader.lazyRequireGetter(this, "ConsoleReflowListener", "devtools/server/actors/webconsole/listeners/console-reflow", true);
   loader.lazyRequireGetter(this, "ContentProcessListener", "devtools/server/actors/webconsole/listeners/content-process", true);
-  loader.lazyRequireGetter(this, "DocumentEventsListener", "devtools/server/actors/webconsole/listeners", true);
+  loader.lazyRequireGetter(this, "DocumentEventsListener", "devtools/server/actors/webconsole/listeners/document-events", true);
 }
 
 function isObject(value) {
   return Object(value) === value;
 }
 
 /**
  * The WebConsoleActor implements capabilities needed for the Web Console
rename from devtools/server/actors/webconsole/listeners.js
rename to devtools/server/actors/webconsole/listeners/document-events.js
--- a/devtools/server/actors/webconsole/listeners.js
+++ b/devtools/server/actors/webconsole/listeners/document-events.js
@@ -1,20 +1,14 @@
 /* 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 {Cc, Ci, components} = require("chrome");
-const {isWindowIncluded} = require("devtools/shared/layout/utils");
-const Services = require("Services");
-const ChromeUtils = require("ChromeUtils");
-const {CONSOLE_WORKER_IDS, WebConsoleUtils} = require("devtools/server/actors/webconsole/utils");
-
 loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/event-emitter");
 
 /**
  * Forward `DOMContentLoaded` and `load` events with precise timing
  * of when events happened according to window.performance numbers.
  *
  * @constructor
  * @param object console
@@ -85,9 +79,8 @@ DocumentEventsListener.prototype = {
   },
 
   destroy() {
     EventEmitter.off(this.console.parentActor, "window-ready", this.onWindowReady);
 
     this.listener = null;
   }
 };
-
--- a/devtools/server/actors/webconsole/listeners/moz.build
+++ b/devtools/server/actors/webconsole/listeners/moz.build
@@ -5,9 +5,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DevToolsModules(
     'console-api.js',
     'console-progress.js',
     'console-reflow.js',
     'console-service.js',
     'content-process.js',
+    'document-events.js',
 )
--- a/devtools/server/actors/webconsole/moz.build
+++ b/devtools/server/actors/webconsole/moz.build
@@ -6,14 +6,13 @@
 
 DIRS += [
     'listeners',
 ]
 
 DevToolsModules(
     'commands.js',
     'content-process-forward.js',
-    'listeners.js',
     'message-manager-mock.js',
     'screenshot.js',
     'utils.js',
     'worker-listeners.js',
 )