Bug 1473513 - Backed out changeset 174fe98999ea for failures on mobile/android/tests/browser/chrome/test_debugger_server.html CLOSED TREE
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 25 Sep 2018 19:33:52 +0300
changeset 438101 4df71e54cd06b9a6bed2e9835252d30777bba43b
parent 438100 e2f0d061af120d3ed5e5b3c4fab441add715cb66
child 438102 2b36f3c32272a194abe713a0da6c3ac5ee4224d4
push id34710
push useraciure@mozilla.com
push dateTue, 25 Sep 2018 21:48:21 +0000
treeherdermozilla-central@17254f49a52e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1473513
milestone64.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 1473513 - Backed out changeset 174fe98999ea for failures on mobile/android/tests/browser/chrome/test_debugger_server.html CLOSED TREE Summary: MozReview-Commit-ID: GfSX2wYfLrN Depends on D6803 Bug #: 1473513 Differential Revision: https://phabricator.services.mozilla.com/D6804
devtools/client/debugger/test/mochitest/head.js
devtools/client/shared/test/shared-head.js
devtools/docs/backend/actor-registration.md
devtools/docs/backend/protocol.js.md
devtools/server/actor-registry.js
devtools/server/actors/targets/browsing-context.js
devtools/server/actors/utils/actor-registry-utils.js
devtools/server/actors/utils/actor-registry.js
devtools/server/actors/utils/moz.build
devtools/server/actors/webbrowser.js
devtools/server/main.js
devtools/server/moz.build
devtools/server/tests/browser/head.js
devtools/server/tests/mochitest/test_connectToFrame.html
devtools/server/tests/unit/head_dbg.js
devtools/server/tests/unit/testactors.js
devtools/shared/security/tests/unit/testactors.js
devtools/shared/transport/tests/unit/head_dbg.js
devtools/shared/transport/tests/unit/testactors-no-bulk.js
devtools/shared/transport/tests/unit/testactors.js
testing/talos/talos/tests/devtools/addon/content/tests/server/protocol.js
--- a/devtools/client/debugger/test/mochitest/head.js
+++ b/devtools/client/debugger/test/mochitest/head.js
@@ -11,17 +11,17 @@ Services.scriptloader.loadSubScript("chr
 // Disable logging for faster test runs. Set this pref to true if you want to
 // debug a test in your try runs. Both the debugger server and frontend will
 // be affected by this pref.
 var gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
 Services.prefs.setBoolPref("devtools.debugger.log", false);
 
 var { BrowserToolboxProcess } = ChromeUtils.import("resource://devtools/client/framework/ToolboxProcess.jsm", {});
 var { DebuggerServer } = require("devtools/server/main");
-var { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+var { ActorRegistry } = require("devtools/server/actor-registry");
 var { DebuggerClient } = require("devtools/shared/client/debugger-client");
 var ObjectClient = require("devtools/shared/client/object-client");
 var { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm", {});
 var EventEmitter = require("devtools/shared/event-emitter");
 var { Toolbox } = require("devtools/client/framework/toolbox");
 var { Task } = require("devtools/shared/task");
 
 const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry);
--- a/devtools/client/shared/test/shared-head.js
+++ b/devtools/client/shared/test/shared-head.js
@@ -750,12 +750,12 @@ async function registerActorInContentPro
              .convertChromeURL(Services.io.newURI(uri)).spec;
   }
   // chrome://mochitests URI is registered only in the parent process, so convert these
   // URLs to file:// one in order to work in the content processes
   url = url.startsWith("chrome://mochitests") ? convertChromeToFile(url) : url;
   return ContentTask.spawn(gBrowser.selectedBrowser, { url, options }, args => {
     // eslint-disable-next-line no-shadow
     const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
-    const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+    const { ActorRegistry } = require("devtools/server/actor-registry");
     ActorRegistry.registerModule(args.url, args.options);
   });
 }
--- a/devtools/docs/backend/actor-registration.md
+++ b/devtools/docs/backend/actor-registration.md
@@ -25,15 +25,15 @@ To register a global actor:
 ```
 ActorRegistry.registerModule("devtools/server/actors/addon/addons", {
   prefix: "addons",
   constructor: "AddonsActor",
   type: { global: true }
 });
 ```
 
-If you are adding a new built-in actor, you should be registering it using `ActorRegistry.registerModule` in `addBrowserActors` or `addTargetScopedActors` in `/devtools/server/actors/utils/actor-registry.js`.
+If you are adding a new built-in actor, you should be registering it using `ActorRegistry.registerModule` in `addBrowserActors` or `addTargetScopedActors` in `/devtools/server/actor-registry.js`.
 
 ## A note about lazy registration
 
 The `ActorRegistry` loads and creates all of the actors lazily to keep the initial memory usage down (which is extremely important on lower end devices).
 
 It becomes especially important when debugging pages with e10s when there are more than one process, because that's when we need to spawn a `DebuggerServer` per process (it may not be immediately obvious that the server in the main process is mostly only here for piping messages to the actors in the child process).
--- a/devtools/docs/backend/protocol.js.md
+++ b/devtools/docs/backend/protocol.js.md
@@ -46,17 +46,17 @@ The actor implementation would go somewh
       sayHello: function () {
        return "hello";
       },
     });
 
     // You also need to export the actor class in your module for discovery.
     exports.HelloActor = HelloActor;
 
-To activate your actor, register it in the `addBrowserActors` method in `server/actors/utils/actor-registry.js`.
+To activate your actor, register it in the `addBrowserActors` method in `server/actor-registry.js`.
 The registration code would look something like this:
 
     this.registerModule("devtools/server/actors/hello-world", {
       prefix: "hello",
       constructor: "HelloActor",
       type: { global: true }
     });
 
rename from devtools/server/actors/utils/actor-registry.js
rename to devtools/server/actor-registry.js
--- a/devtools/server/actors/targets/browsing-context.js
+++ b/devtools/server/actors/targets/browsing-context.js
@@ -18,17 +18,17 @@
  * For performance matters, this file should only be loaded in the targeted context's
  * process. For example, it shouldn't be evaluated in the parent process until we try to
  * debug a document living in the parent process.
  */
 
 var { Ci, Cu, Cr, Cc } = require("chrome");
 var Services = require("Services");
 const ChromeUtils = require("ChromeUtils");
-var { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+var { ActorRegistry } = require("devtools/server/actor-registry");
 var DevToolsUtils = require("devtools/shared/DevToolsUtils");
 var { assert } = DevToolsUtils;
 var { TabSources } = require("devtools/server/actors/utils/TabSources");
 var makeDebugger = require("devtools/server/actors/utils/make-debugger");
 const Debugger = require("Debugger");
 const ReplayDebugger = require("devtools/server/actors/replay/debugger");
 const InspectorUtils = require("InspectorUtils");
 
--- a/devtools/server/actors/utils/actor-registry-utils.js
+++ b/devtools/server/actors/utils/actor-registry-utils.js
@@ -2,17 +2,17 @@
  * 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 { Cu, CC } = require("chrome");
 
 const { DebuggerServer } = require("devtools/server/main");
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 
 /**
  * Support for actor registration. Main used by ActorRegistryActor
  * for dynamic registration of new actors.
  *
  * @param sourceText {String} Source of the actor implementation
  * @param fileName {String} URL of the actor module (for proper stack traces)
  * @param options {Object} Configuration object
--- a/devtools/server/actors/utils/moz.build
+++ b/devtools/server/actors/utils/moz.build
@@ -1,17 +1,16 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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(
     'actor-registry-utils.js',
-    'actor-registry.js',
     'audionodes.json',
     'automation-timeline.js',
     'breakpoint-actor-map.js',
     'call-watcher.js',
     'css-grid-utils.js',
     'event-loop.js',
     'function-call.js',
     'make-debugger.js',
--- a/devtools/server/actors/webbrowser.js
+++ b/devtools/server/actors/webbrowser.js
@@ -4,17 +4,17 @@
  * 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";
 
 var { Ci } = require("chrome");
 var Services = require("Services");
 var { DebuggerServer } = require("devtools/server/main");
-var { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+var { ActorRegistry } = require("devtools/server/actor-registry");
 var DevToolsUtils = require("devtools/shared/DevToolsUtils");
 
 loader.lazyRequireGetter(this, "RootActor", "devtools/server/actors/root", true);
 loader.lazyRequireGetter(this, "FrameTargetActorProxy", "devtools/server/actors/targets/frame-proxy", true);
 loader.lazyRequireGetter(this, "AddonTargetActor", "devtools/server/actors/targets/addon", true);
 loader.lazyRequireGetter(this, "WebExtensionActor", "devtools/server/actors/addon/webextension", true);
 loader.lazyRequireGetter(this, "WorkerTargetActorList", "devtools/server/actors/worker/worker-list", true);
 loader.lazyRequireGetter(this, "ServiceWorkerRegistrationActorList", "devtools/server/actors/worker/worker-list", true);
--- a/devtools/server/main.js
+++ b/devtools/server/main.js
@@ -6,17 +6,17 @@
 
 /**
  * Toolkit glue for the remote debugging protocol, loaded into the
  * debugging global.
  */
 var { Ci, Cc } = require("chrome");
 var Services = require("Services");
 var { Pool } = require("devtools/shared/protocol");
-var { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+var { ActorRegistry } = require("devtools/server/actor-registry");
 var DevToolsUtils = require("devtools/shared/DevToolsUtils");
 var { dumpn } = DevToolsUtils;
 
 loader.lazyRequireGetter(this, "DebuggerSocket", "devtools/shared/security/socket", true);
 loader.lazyRequireGetter(this, "Authentication", "devtools/shared/security/auth");
 loader.lazyRequireGetter(this, "LocalDebuggerTransport", "devtools/shared/transport/local-transport", true);
 loader.lazyRequireGetter(this, "ChildDebuggerTransport", "devtools/shared/transport/child-transport", true);
 loader.lazyRequireGetter(this, "WorkerThreadWorkerDebuggerTransport", "devtools/shared/transport/worker-transport", true);
--- a/devtools/server/moz.build
+++ b/devtools/server/moz.build
@@ -15,13 +15,14 @@ DIRS += [
 
 if CONFIG['MOZ_BUILD_APP'] != 'mobile/android':
     BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
 
 MOCHITEST_CHROME_MANIFESTS += ['tests/mochitest/chrome.ini']
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 DevToolsModules(
+    'actor-registry.js',
     'main.js',
 )
 
 with Files('**'):
     BUG_COMPONENT = ('DevTools', 'General')
--- a/devtools/server/tests/browser/head.js
+++ b/devtools/server/tests/browser/head.js
@@ -7,17 +7,17 @@
 /* eslint no-unused-vars: [2, {"vars": "local"}] */
 /* import-globals-from ../../../client/shared/test/shared-head.js */
 
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/shared/test/shared-head.js",
   this);
 
 const {DebuggerClient} = require("devtools/shared/client/debugger-client");
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 const {DebuggerServer} = require("devtools/server/main");
 
 const PATH = "browser/devtools/server/tests/browser/";
 const MAIN_DOMAIN = "http://test1.example.org/" + PATH;
 const ALT_DOMAIN = "http://sectest1.example.org/" + PATH;
 const ALT_DOMAIN_SECURED = "https://sectest1.example.org:443/" + PATH;
 
 // GUID to be used as a separator in compound keys. This must match the same
--- a/devtools/server/tests/mochitest/test_connectToFrame.html
+++ b/devtools/server/tests/mochitest/test_connectToFrame.html
@@ -42,17 +42,17 @@ function runTests() {
   const mm = iframe.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.messageManager;
 
   // Register a test actor in the child process so that we can know if and when
   // this fake actor is destroyed.
   mm.loadFrameScript("data:text/javascript,new " + function FrameScriptScope() {
     /* eslint-disable no-shadow */
     const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
     const { DebuggerServer } = require("devtools/server/main");
-    const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+    const { ActorRegistry } = require("devtools/server/actor-registry");
     /* eslint-enable no-shadow */
 
     DebuggerServer.init();
 
     function TestActor() {
       dump("instanciate test actor\n");
     }
     TestActor.prototype = {
--- a/devtools/server/tests/unit/head_dbg.js
+++ b/devtools/server/tests/unit/head_dbg.js
@@ -26,17 +26,17 @@ const { NetUtil } = require("resource://
 const Services = require("Services");
 // Always log packets when running tests. runxpcshelltests.py will throw
 // the output away anyway, unless you give it the --verbose flag.
 Services.prefs.setBoolPref("devtools.debugger.log", true);
 // Enable remote debugging for the relevant tests.
 Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true);
 
 const DevToolsUtils = require("devtools/shared/DevToolsUtils");
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 const { DebuggerServer } = require("devtools/server/main");
 const { DebuggerServer: WorkerDebuggerServer } = worker.require("devtools/server/main");
 const { DebuggerClient } = require("devtools/shared/client/debugger-client");
 const ObjectClient = require("devtools/shared/client/object-client");
 const { MemoryFront } = require("devtools/shared/fronts/memory");
 
 const { addDebuggerToGlobal } = ChromeUtils.import("resource://gre/modules/jsdebugger.jsm", {});
 
--- a/devtools/server/tests/unit/testactors.js
+++ b/devtools/server/tests/unit/testactors.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const { LazyPool, createExtraActors } = require("devtools/shared/protocol/lazy-pool");
 const { RootActor } = require("devtools/server/actors/root");
 const { ThreadActor } = require("devtools/server/actors/thread");
 const { DebuggerServer } = require("devtools/server/main");
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 const { TabSources } = require("devtools/server/actors/utils/TabSources");
 const makeDebugger = require("devtools/server/actors/utils/make-debugger");
 
 var gTestGlobals = [];
 DebuggerServer.addTestGlobal = function(global) {
   gTestGlobals.push(global);
 };
 
--- a/devtools/shared/security/tests/unit/testactors.js
+++ b/devtools/shared/security/tests/unit/testactors.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 const { LazyPool, createExtraActors } = require("devtools/shared/protocol/lazy-pool");
 const { RootActor } = require("devtools/server/actors/root");
 const { ThreadActor } = require("devtools/server/actors/thread");
 const { DebuggerServer } = require("devtools/server/main");
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 const promise = require("promise");
 
 var gTestGlobals = [];
 DebuggerServer.addTestGlobal = function(global) {
   gTestGlobals.push(global);
 };
 
 // A mock tab list, for use by tests. This simply presents each global in
--- a/devtools/shared/transport/tests/unit/head_dbg.js
+++ b/devtools/shared/transport/tests/unit/head_dbg.js
@@ -20,17 +20,17 @@ const Services = require("Services");
 // we can be sending large amounts of data. The test harness has
 // trouble dealing with logging all the data, and we end up with
 // intermittent time outs (e.g. bug 775924).
 // Services.prefs.setBoolPref("devtools.debugger.log", true);
 // Services.prefs.setBoolPref("devtools.debugger.log.verbose", true);
 // Enable remote debugging for the relevant tests.
 Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true);
 
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 const { DebuggerServer } = require("devtools/server/main");
 const { DebuggerClient } = require("devtools/shared/client/debugger-client");
 
 // Convert an nsIScriptError 'flags' value into an appropriate string.
 function scriptErrorFlagsToKind(flags) {
   let kind;
   if (flags & Ci.nsIScriptError.warningFlag) {
     kind = "warning";
--- a/devtools/shared/transport/tests/unit/testactors-no-bulk.js
+++ b/devtools/shared/transport/tests/unit/testactors-no-bulk.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 const { RootActor } = require("devtools/server/actors/root");
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 
 /**
  * Root actor that doesn't have the bulk trait.
  */
 exports.createRootActor = function createRootActor(connection) {
   const root = new RootActor(connection, {
     globalActorFactories: ActorRegistry.globalActorFactories
   });
--- a/devtools/shared/transport/tests/unit/testactors.js
+++ b/devtools/shared/transport/tests/unit/testactors.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 const { LazyPool, createExtraActors } = require("devtools/shared/protocol/lazy-pool");
 const { RootActor } = require("devtools/server/actors/root");
 const { ThreadActor } = require("devtools/server/actors/thread");
 const { DebuggerServer } = require("devtools/server/main");
-const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+const { ActorRegistry } = require("devtools/server/actor-registry");
 
 var gTestGlobals = [];
 DebuggerServer.addTestGlobal = function(global) {
   gTestGlobals.push(global);
 };
 
 // A mock tab list, for use by tests. This simply presents each global in
 // gTestGlobals as a tab, and the list is fixed: it never calls its
--- a/testing/talos/talos/tests/devtools/addon/content/tests/server/protocol.js
+++ b/testing/talos/talos/tests/devtools/addon/content/tests/server/protocol.js
@@ -29,17 +29,17 @@ module.exports = async function() {
   let tab = await testSetup(SIMPLE_URL);
   let messageManager = tab.linkedBrowser.messageManager;
 
   // Register a test actor within the content process
   messageManager.loadFrameScript("data:,(" + encodeURIComponent(
     `function () {
       const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
 
-      const { ActorRegistry } = require("devtools/server/actors/utils/actor-registry");
+      const { ActorRegistry } = require("devtools/server/actor-registry");
       ActorRegistry.registerModule("chrome://damp/content/tests/server/actor.js", {
         prefix: "dampTest",
         constructor: "DampTestActor",
         type: { target: true }
       });
     }`
   ) + ")()", true);