Bug 1416711 - Migrate addBrowser/TabActors to registerActors;r=ochameau
authorJulian Descottes <jdescottes@mozilla.com>
Mon, 13 Nov 2017 20:29:55 +0100
changeset 437988 e2993f4377faf706eb2cf158721c484a4607422b
parent 437987 b9b7d5086d370c5f98fb60284cda7f274712ec30
child 437989 71cc1ff4febe42ebc14eb757e3842940b117bcdb
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersochameau
bugs1416711
milestone59.0a1
Bug 1416711 - Migrate addBrowser/TabActors to registerActors;r=ochameau DebuggerServer has old APIs addBrowserActors & addTabActors that can be replaced by calls to registerActors. MozReview-Commit-ID: KpYJpbSHM8I
devtools/client/canvasdebugger/test/head.js
devtools/client/debugger/new/test/mochitest/browser_dbg-chrome-debugging.js
devtools/client/debugger/test/mochitest/browser_dbg_WorkerActor.attach.js
devtools/client/debugger/test/mochitest/browser_dbg_WorkerActor.attachThread.js
devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-event-01.js
devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-event-02.js
devtools/client/debugger/test/mochitest/browser_dbg_chrome-debugging.js
devtools/client/debugger/test/mochitest/browser_dbg_debugger-statement.js
devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-01.js
devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-02.js
devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-03.js
devtools/client/debugger/test/mochitest/browser_dbg_globalactor.js
devtools/client/debugger/test/mochitest/browser_dbg_listaddons.js
devtools/client/debugger/test/mochitest/browser_dbg_listtabs-01.js
devtools/client/debugger/test/mochitest/browser_dbg_listtabs-02.js
devtools/client/debugger/test/mochitest/browser_dbg_listtabs-03.js
devtools/client/debugger/test/mochitest/browser_dbg_listworkers.js
devtools/client/debugger/test/mochitest/browser_dbg_multiple-windows.js
devtools/client/debugger/test/mochitest/browser_dbg_navigation.js
devtools/client/debugger/test/mochitest/browser_dbg_promises-allocation-stack.js
devtools/client/debugger/test/mochitest/browser_dbg_promises-chrome-allocation-stack.js
devtools/client/debugger/test/mochitest/browser_dbg_promises-fulfillment-stack.js
devtools/client/debugger/test/mochitest/browser_dbg_promises-rejection-stack.js
devtools/client/debugger/test/mochitest/browser_dbg_tabactor-01.js
devtools/client/debugger/test/mochitest/browser_dbg_tabactor-02.js
devtools/client/debugger/test/mochitest/browser_dbg_worker-window.js
devtools/client/debugger/test/mochitest/head.js
devtools/client/framework/devtools-browser.js
devtools/client/framework/target-from-url.js
devtools/client/framework/test/browser_target_from_url.js
devtools/client/framework/test/browser_toolbox_tool_remote_reopen.js
devtools/client/framework/test/browser_two_tabs.js
devtools/client/framework/test/head.js
devtools/client/framework/toolbox-init.js
devtools/client/responsive.html/manager.js
devtools/client/scratchpad/scratchpad.js
devtools/client/shadereditor/test/head.js
devtools/client/shared/test/test-actor-registry.js
devtools/client/webaudioeditor/test/head.js
devtools/client/webide/modules/runtimes.js
devtools/client/webide/test/browser_tabs.js
devtools/client/webide/test/test_autoconnect_runtime.html
devtools/client/webide/test/test_autoselect_project.html
devtools/client/webide/test/test_device_preferences.html
devtools/client/webide/test/test_device_runtime.html
devtools/client/webide/test/test_runtime.html
devtools/client/webide/test/test_toolbox.html
devtools/docs/backend/actor-registration.md
devtools/docs/backend/client-api.md
devtools/docs/backend/protocol.js.md
devtools/server/main.js
devtools/server/tests/browser/browser_register_actor.js
devtools/server/tests/browser/head.js
devtools/server/tests/mochitest/inspector-helpers.js
devtools/server/tests/mochitest/memory-helpers.js
devtools/server/tests/mochitest/test_connectToChild.html
devtools/server/tests/mochitest/test_connection-manager.html
devtools/server/tests/mochitest/test_device.html
devtools/server/tests/mochitest/test_framerate_01.html
devtools/server/tests/mochitest/test_framerate_02.html
devtools/server/tests/mochitest/test_framerate_03.html
devtools/server/tests/mochitest/test_framerate_05.html
devtools/server/tests/mochitest/test_getProcess.html
devtools/server/tests/mochitest/test_preference.html
devtools/server/tests/mochitest/test_setupInParentChild.html
devtools/server/tests/mochitest/webconsole-helpers.js
devtools/server/tests/mochitest/webextension-helpers.js
devtools/server/tests/unit/head_dbg.js
devtools/server/tests/unit/test_actor-registry-actor.js
devtools/server/tests/unit/test_add_actors.js
devtools/server/tests/unit/test_client_request.js
devtools/server/tests/unit/test_eventlooplag_actor.js
devtools/server/tests/unit/test_registerClient.js
devtools/server/tests/unit/test_register_actor.js
devtools/server/tests/unit/test_requestTypes.js
devtools/shared/gcli/commands/listen.js
devtools/shared/security/tests/chrome/test_websocket-transport.html
devtools/shared/webconsole/test/common.js
devtools/shim/devtools-startup.js
mobile/android/chrome/content/RemoteDebugger.js
mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
testing/xpcshell/head.js
--- a/devtools/client/canvasdebugger/test/head.js
+++ b/devtools/client/canvasdebugger/test/head.js
@@ -188,17 +188,17 @@ function navigate(aTarget, aUrl, aWaitFo
 function reload(aTarget, aWaitForTargetEvent = "navigate") {
   executeSoon(() => aTarget.activeTab.reload());
   return once(aTarget, aWaitForTargetEvent);
 }
 
 function initServer() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 }
 
 function initCallWatcherBackend(aUrl) {
   info("Initializing a call watcher front.");
   initServer();
 
   return Task.spawn(function* () {
--- a/devtools/client/debugger/new/test/mochitest/browser_dbg-chrome-debugging.js
+++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-chrome-debugging.js
@@ -15,17 +15,17 @@ var { DevToolsLoader } = Cu.import("reso
 var customLoader = new DevToolsLoader();
 customLoader.invisibleToDebugger = true;
 var { DebuggerServer } = customLoader.require("devtools/server/main");
 var { DebuggerClient } = require("devtools/shared/client/debugger-client");
 
 function initDebuggerClient() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
   DebuggerServer.allowChromeProcess = true;
 
   let transport = DebuggerServer.connectPipe();
   return new DebuggerClient(transport);
 }
 
 function attachThread(client, actor) {
--- a/devtools/client/debugger/test/mochitest/browser_dbg_WorkerActor.attach.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_WorkerActor.attach.js
@@ -6,17 +6,17 @@ var WORKER1_URL = "code_WorkerActor.atta
 var WORKER2_URL = "code_WorkerActor.attach-worker2.js";
 
 function test() {
   Task.spawn(function* () {
     let oldMaxTotalViewers = SpecialPowers.getIntPref(MAX_TOTAL_VIEWERS);
     SpecialPowers.setIntPref(MAX_TOTAL_VIEWERS, 10);
 
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
     let client = new DebuggerClient(DebuggerServer.connectPipe());
     yield connect(client);
 
     let tab = yield addTab(TAB1_URL);
     let { tabs } = yield listTabs(client);
     let [, tabClient] = yield attachTab(client, findTab(tabs, TAB1_URL));
     yield listWorkers(tabClient);
--- a/devtools/client/debugger/test/mochitest/browser_dbg_WorkerActor.attachThread.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_WorkerActor.attachThread.js
@@ -1,15 +1,15 @@
 var TAB_URL = EXAMPLE_URL + "doc_WorkerActor.attachThread-tab.html";
 var WORKER_URL = "code_WorkerActor.attachThread-worker.js";
 
 function test() {
   Task.spawn(function* () {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
     let client1 = new DebuggerClient(DebuggerServer.connectPipe());
     yield connect(client1);
     let client2 = new DebuggerClient(DebuggerServer.connectPipe());
     yield connect(client2);
 
     let tab = yield addTab(TAB_URL);
     let { tabs: tabs1 } = yield listTabs(client1);
--- a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-event-01.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-event-01.js
@@ -9,17 +9,17 @@
 
 const TAB_URL = EXAMPLE_URL + "doc_event-listeners-01.html";
 
 var gClient, gThreadClient, gInput, gButton;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-event-02.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-event-02.js
@@ -10,17 +10,17 @@
 
 const TAB_URL = EXAMPLE_URL + "doc_event-listeners-03.html";
 
 var gClient, gThreadClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_chrome-debugging.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_chrome-debugging.js
@@ -17,17 +17,17 @@ var gNewChromeSource = promise.defer();
 var { DevToolsLoader } = Cu.import("resource://devtools/shared/Loader.jsm", {});
 var customLoader = new DevToolsLoader();
 customLoader.invisibleToDebugger = true;
 var { DebuggerServer } = customLoader.require("devtools/server/main");
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
   DebuggerServer.allowChromeProcess = true;
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
--- a/devtools/client/debugger/test/mochitest/browser_dbg_debugger-statement.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_debugger-statement.js
@@ -10,17 +10,17 @@
 const TAB_URL = EXAMPLE_URL + "doc_inline-debugger-statement.html";
 
 var gClient;
 var gTab;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-01.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-01.js
@@ -10,17 +10,17 @@
 const TAB_URL = EXAMPLE_URL + "doc_event-listeners-01.html";
 
 var gClient;
 var gTab;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-02.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-02.js
@@ -11,17 +11,17 @@
 const TAB_URL = EXAMPLE_URL + "doc_event-listeners-03.html";
 
 var gClient;
 var gTab;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-03.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-03.js
@@ -11,17 +11,17 @@
 const TAB_URL = EXAMPLE_URL + "doc_native-event-handler.html";
 
 var gClient;
 var gTab;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_globalactor.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_globalactor.js
@@ -9,17 +9,17 @@
 
 const ACTORS_URL = CHROME_URL + "testactors.js";
 
 function test() {
   let gClient;
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   DebuggerServer.addActors(ACTORS_URL);
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
--- a/devtools/client/debugger/test/mochitest/browser_dbg_listaddons.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_listaddons.js
@@ -11,17 +11,17 @@ const ADDON1_PATH = "addon1.xpi";
 const ADDON2_ID = "jid1-qjtzNGV8xw5h2A@jetpack";
 const ADDON2_PATH = "addon2.xpi";
 
 var gAddon1, gAddon1Actor, gAddon2, gAddon2Actor, gClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_listtabs-01.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_listtabs-01.js
@@ -10,17 +10,17 @@
 const TAB1_URL = EXAMPLE_URL + "doc_empty-tab-01.html";
 const TAB2_URL = EXAMPLE_URL + "doc_empty-tab-02.html";
 
 var gTab1, gTab1Actor, gTab2, gTab2Actor, gClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_listtabs-02.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_listtabs-02.js
@@ -22,17 +22,17 @@ var gNewWindow;
 var onListChangedCount = 0;
 function onListChangedHandler() {
   onListChangedCount++;
 }
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   gTabList = new BrowserTabList("fake DebuggerServerConnection");
   gTabList._testing = true;
   gTabList.onListChanged = onListChangedHandler;
 
   checkSingleTab()
     .then(addTabA)
--- a/devtools/client/debugger/test/mochitest/browser_dbg_listtabs-03.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_listtabs-03.js
@@ -9,17 +9,17 @@
 
 const TAB1_URL = EXAMPLE_URL + "doc_empty-tab-01.html";
 
 var gTab1, gTab1Actor, gTab2, gTab2Actor, gClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(Task.async(function* ([aType, aTraits]) {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
     let tab = yield addTab(TAB1_URL);
--- a/devtools/client/debugger/test/mochitest/browser_dbg_listworkers.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_listworkers.js
@@ -1,16 +1,16 @@
 var TAB_URL = EXAMPLE_URL + "doc_listworkers-tab.html";
 var WORKER1_URL = "code_listworkers-worker1.js";
 var WORKER2_URL = "code_listworkers-worker2.js";
 
 function test() {
   Task.spawn(function* () {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
     let client = new DebuggerClient(DebuggerServer.connectPipe());
     yield connect(client);
 
     let tab = yield addTab(TAB_URL);
     let { tabs } = yield listTabs(client);
     let [, tabClient] = yield attachTab(client, findTab(tabs, TAB_URL));
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_multiple-windows.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_multiple-windows.js
@@ -12,17 +12,17 @@ const TAB1_URL = EXAMPLE_URL + "doc_scri
 const TAB2_URL = EXAMPLE_URL + "doc_script-switching-02.html";
 
 var gNewTab, gNewWindow;
 var gClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_navigation.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_navigation.js
@@ -10,17 +10,17 @@
 const TAB1_URL = EXAMPLE_URL + "doc_empty-tab-01.html";
 const TAB2_URL = EXAMPLE_URL + "doc_empty-tab-02.html";
 
 var gClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_promises-allocation-stack.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_promises-allocation-stack.js
@@ -11,17 +11,17 @@
 
 const TAB_URL = EXAMPLE_URL + "doc_promise-get-allocation-stack.html";
 const { PromisesFront } = require("devtools/shared/fronts/promises");
 var EventEmitter = require("devtools/shared/event-emitter");
 
 function test() {
   Task.spawn(function* () {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
     let options = {
       source: TAB_URL,
       line: 1
     };
     const [ tab,, panel ] = yield initDebugger(TAB_URL, options);
 
     let client = new DebuggerClient(DebuggerServer.connectPipe());
--- a/devtools/client/debugger/test/mochitest/browser_dbg_promises-chrome-allocation-stack.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_promises-chrome-allocation-stack.js
@@ -19,17 +19,17 @@ const STACK_DATA = [
   { functionDisplayName: "testGetAllocationStack" },
 ];
 
 function test() {
   Task.spawn(function* () {
     requestLongerTimeout(10);
 
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     DebuggerServer.allowChromeProcess = true;
 
     let client = new DebuggerClient(DebuggerServer.connectPipe());
     yield connect(client);
     let chrome = yield client.getProcess();
     let [, tabClient] = yield attachTab(client, chrome.form);
     yield tabClient.attachThread();
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_promises-fulfillment-stack.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_promises-fulfillment-stack.js
@@ -29,17 +29,17 @@ const TEST_DATA = [
     line: 14,
     column: 15
   },
 ];
 
 function test() {
   Task.spawn(function* () {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
     let options = {
       source: TAB_URL,
       line: 1
     };
     const [ tab,, panel ] = yield initDebugger(TAB_URL, options);
 
     let client = new DebuggerClient(DebuggerServer.connectPipe());
--- a/devtools/client/debugger/test/mochitest/browser_dbg_promises-rejection-stack.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_promises-rejection-stack.js
@@ -36,17 +36,17 @@ const TEST_DATA = [
     line: 14,
     column: 15
   },
 ];
 
 function test() {
   Task.spawn(function* () {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
     let options = {
       source: TAB_URL,
       line: 1
     };
     const [ tab,, panel ] = yield initDebugger(TAB_URL, options);
 
     let client = new DebuggerClient(DebuggerServer.connectPipe());
--- a/devtools/client/debugger/test/mochitest/browser_dbg_tabactor-01.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_tabactor-01.js
@@ -10,17 +10,17 @@
 const ACTORS_URL = CHROME_URL + "testactors.js";
 const TAB_URL = EXAMPLE_URL + "doc_empty-tab-01.html";
 
 var gClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   DebuggerServer.addActors(ACTORS_URL);
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
--- a/devtools/client/debugger/test/mochitest/browser_dbg_tabactor-02.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_tabactor-02.js
@@ -10,17 +10,17 @@
 const ACTORS_URL = CHROME_URL + "testactors.js";
 const TAB_URL = EXAMPLE_URL + "doc_empty-tab-01.html";
 
 var gClient;
 
 function test() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   DebuggerServer.addActors(ACTORS_URL);
 
   let transport = DebuggerServer.connectPipe();
   gClient = new DebuggerClient(transport);
   gClient.connect().then(([aType, aTraits]) => {
     is(aType, "browser",
--- a/devtools/client/debugger/test/mochitest/browser_dbg_worker-window.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_worker-window.js
@@ -10,17 +10,17 @@ PromiseTestUtils.expectUncaughtRejection
 
 var TAB_URL = EXAMPLE_URL + "doc_WorkerActor.attachThread-tab.html";
 var WORKER_URL = "code_WorkerActor.attachThread-worker.js";
 
 add_task(function* () {
   yield pushPrefs(["devtools.scratchpad.enabled", true]);
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   yield connect(client);
 
   let tab = yield addTab(TAB_URL);
   let { tabs } = yield listTabs(client);
   let [, tabClient] = yield attachTab(client, findTab(tabs, TAB_URL));
 
--- a/devtools/client/debugger/test/mochitest/head.js
+++ b/devtools/client/debugger/test/mochitest/head.js
@@ -624,17 +624,17 @@ function AddonDebugger() {
 }
 
 AddonDebugger.prototype = {
   init: Task.async(function* (aAddonId) {
     info("Initializing an addon debugger panel.");
 
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
     DebuggerServer.allowChromeProcess = true;
 
     this.frame = document.createElement("iframe");
     this.frame.setAttribute("height", 400);
     document.documentElement.appendChild(this.frame);
     window.addEventListener("message", this._onMessage);
 
@@ -1321,17 +1321,17 @@ function waitForDispatch(panel, type, ev
       info(type + " dispatched " + count + " time(s)");
     }
   });
 }
 
 function* initWorkerDebugger(TAB_URL, WORKER_URL) {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   yield connect(client);
 
   let tab = yield addTab(TAB_URL);
   let { tabs } = yield listTabs(client);
   let [, tabClient] = yield attachTab(client, findTab(tabs, TAB_URL));
--- a/devtools/client/framework/devtools-browser.js
+++ b/devtools/client/framework/devtools-browser.js
@@ -325,17 +325,17 @@ var gDevToolsBrowser = exports.gDevTools
       Services.ww.openWindow(null, "chrome://webide/content/", "webide", "chrome,centerscreen,resizable", null);
     }
   },
 
   _getContentProcessTarget(processId) {
     // Create a DebuggerServer in order to connect locally to it
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
     DebuggerServer.allowChromeProcess = true;
 
     let transport = DebuggerServer.connectPipe();
     let client = new DebuggerClient(transport);
 
     let deferred = defer();
     client.connect().then(() => {
--- a/devtools/client/framework/target-from-url.js
+++ b/devtools/client/framework/target-from-url.js
@@ -129,14 +129,14 @@ function* createClient(params) {
 
   let transport;
   if (port) {
     transport = yield DebuggerClient.socketConnect({ host, port, webSocket });
   } else {
     // Setup a server if we don't have one already running
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
     transport = DebuggerServer.connectPipe();
   }
   return new DebuggerClient(transport);
 }
--- a/devtools/client/framework/test/browser_target_from_url.js
+++ b/devtools/client/framework/test/browser_target_from_url.js
@@ -76,17 +76,17 @@ add_task(function* () {
 });
 
 function* setupDebuggerServer(websocket) {
   info("Create a separate loader instance for the DebuggerServer.");
   let loader = new DevToolsLoader();
   let { DebuggerServer } = loader.require("devtools/server/main");
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   DebuggerServer.allowChromeProcess = true;
 
   let listener = DebuggerServer.createListener();
   ok(listener, "Socket listener created");
   // Pass -1 to automatically choose an available port
   listener.portOrPath = -1;
   listener.webSocket = websocket;
   yield listener.open();
--- a/devtools/client/framework/test/browser_toolbox_tool_remote_reopen.js
+++ b/devtools/client/framework/test/browser_toolbox_tool_remote_reopen.js
@@ -60,17 +60,17 @@ function runTools(target) {
   });
 }
 
 function getClient() {
   let deferred = defer();
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let transport = DebuggerServer.connectPipe();
   let client = new DebuggerClient(transport);
 
   return client.connect().then(() => client);
 }
 
--- a/devtools/client/framework/test/browser_two_tabs.js
+++ b/devtools/client/framework/test/browser_two_tabs.js
@@ -17,17 +17,17 @@ var gClient;
 var gTab1, gTab2;
 var gTabActor1, gTabActor2;
 
 function test() {
   waitForExplicitFinish();
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   openTabs();
 }
 
 function openTabs() {
   // Open two tabs, select the second
   addTab(TAB_URL_1).then(tab1 => {
--- a/devtools/client/framework/test/head.js
+++ b/devtools/client/framework/test/head.js
@@ -25,17 +25,17 @@ function toggleAllTools(state) {
 
 function getChromeActors(callback)
 {
   let { DebuggerServer } = require("devtools/server/main");
   let { DebuggerClient } = require("devtools/shared/client/debugger-client");
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
   DebuggerServer.allowChromeProcess = true;
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect()
     .then(() => client.getProcess())
     .then(response => {
       callback(client, response.form);
--- a/devtools/client/framework/toolbox-init.js
+++ b/devtools/client/framework/toolbox-init.js
@@ -67,17 +67,17 @@ if (url.search.length > 1) {
       iframe = XPCNativeWrapper(iframe);
 
       // Fake a xul:tab object as we don't have one.
       // linkedBrowser is the only one attribute being queried by client.getTab
       let tab = { linkedBrowser: iframe };
 
       if (!DebuggerServer.initialized) {
         DebuggerServer.init();
-        DebuggerServer.addBrowserActors();
+        DebuggerServer.registerActors({ browser: true, root: true, tab: true });
       }
       let client = new DebuggerClient(DebuggerServer.connectPipe());
 
       yield client.connect();
       // Creates a target for a given browser iframe.
       let response = yield client.getTab({ tab });
       let form = response.tab;
       target = yield TargetFactory.forRemoteTab({client, form, chrome: false});
--- a/devtools/client/responsive.html/manager.js
+++ b/devtools/client/responsive.html/manager.js
@@ -427,17 +427,17 @@ ResponsiveUI.prototype = {
     this.destroyed = true;
 
     return true;
   }),
 
   connectToServer: Task.async(function* () {
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
     this.client = new DebuggerClient(DebuggerServer.connectPipe());
     yield this.client.connect();
     let { tab } = yield this.client.getTab();
     this.emulationFront = EmulationFront(this.client, tab);
   }),
 
   handleEvent(event) {
--- a/devtools/client/scratchpad/scratchpad.js
+++ b/devtools/client/scratchpad/scratchpad.js
@@ -2183,17 +2183,17 @@ ScratchpadWindow.prototype = Heritage.ex
    *
    * @return Promise
    *         The promise for the target for this window.
    */
   _attach: function SW__attach()
   {
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
     DebuggerServer.allowChromeProcess = true;
 
     let client = new DebuggerClient(DebuggerServer.connectPipe());
     return client.connect()
       .then(() => client.getProcess())
       .then(aResponse => {
         return { form: aResponse.form, client: client };
--- a/devtools/client/shadereditor/test/head.js
+++ b/devtools/client/shadereditor/test/head.js
@@ -223,17 +223,17 @@ function reload(aTarget, aWaitForTargetE
   return once(aTarget, aWaitForTargetEvent);
 }
 
 function initBackend(aUrl) {
   info("Initializing a shader editor front.");
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   return Task.spawn(function* () {
     let tab = yield addTab(aUrl);
     let target = TargetFactory.forTab(tab);
 
     yield target.makeRemote();
 
--- a/devtools/client/shared/test/test-actor-registry.js
+++ b/devtools/client/shared/test/test-actor-registry.js
@@ -63,17 +63,17 @@
   exports.getTestActorWithoutToolbox = Task.async(function* (tab) {
     let { DebuggerServer } = require("devtools/server/main");
     let { DebuggerClient } = require("devtools/shared/client/debugger-client");
 
     // We need to spawn a client instance,
     // but for that we have to first ensure a server is running
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
     let client = new DebuggerClient(DebuggerServer.connectPipe());
 
     yield client.connect();
 
     // We also need to make sure the test actor is registered on the server.
     yield exports.registerTestActor(client);
 
--- a/devtools/client/webaudioeditor/test/head.js
+++ b/devtools/client/webaudioeditor/test/head.js
@@ -158,17 +158,17 @@ function loadFrameScripts() {
  * Adds a new tab, and instantiate a WebAudiFront object.
  * This requires calling removeTab before the test ends.
  */
 function initBackend(aUrl) {
   info("Initializing a web audio editor front.");
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   return Task.spawn(function* () {
     let tab = yield addTab(aUrl);
     let target = TargetFactory.forTab(tab);
 
     yield target.makeRemote();
 
--- a/devtools/client/webide/modules/runtimes.js
+++ b/devtools/client/webide/modules/runtimes.js
@@ -434,17 +434,17 @@ WiFiRuntime.prototype = {
 // For testing use only
 exports._WiFiRuntime = WiFiRuntime;
 
 var gLocalRuntime = {
   type: RuntimeTypes.LOCAL,
   connect: function (connection) {
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
     DebuggerServer.allowChromeProcess = true;
     connection.host = null; // Force Pipe transport
     connection.port = null;
     connection.connect();
     return promise.resolve();
   },
   get id() {
--- a/devtools/client/webide/test/browser_tabs.js
+++ b/devtools/client/webide/test/browser_tabs.js
@@ -8,17 +8,17 @@ function test() {
   waitForExplicitFinish();
   requestCompleteLog();
 
   Task.spawn(function* () {
     // Since we test the connections set below, destroy the server in case it
     // was left open.
     DebuggerServer.destroy();
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
     let tab = yield addTab(TEST_URI);
 
     let win = yield openWebIDE();
     let docProject = getProjectDocument(win);
     let docRuntime = getRuntimeDocument(win);
 
     yield connectToLocal(win, docRuntime);
--- a/devtools/client/webide/test/test_autoconnect_runtime.html
+++ b/devtools/client/webide/test/test_autoconnect_runtime.html
@@ -16,17 +16,17 @@
 
     <script type="application/javascript">
       window.onload = function() {
         SimpleTest.waitForExplicitFinish();
 
         Task.spawn(function*() {
           if (!DebuggerServer.initialized) {
             DebuggerServer.init();
-            DebuggerServer.addBrowserActors();
+            DebuggerServer.registerActors({ browser: true, root: true, tab: true });
           }
 
           let win = yield openWebIDE();
           let docRuntime = getRuntimeDocument(win);
 
           let fakeRuntime = {
             type: "USB",
             connect: function(connection) {
--- a/devtools/client/webide/test/test_autoselect_project.html
+++ b/devtools/client/webide/test/test_autoselect_project.html
@@ -16,17 +16,17 @@
 
     <script type="application/javascript">
       window.onload = function() {
         SimpleTest.waitForExplicitFinish();
 
         Task.spawn(function* () {
           if (!DebuggerServer.initialized) {
             DebuggerServer.init();
-            DebuggerServer.addBrowserActors();
+            DebuggerServer.registerActors({ browser: true, root: true, tab: true });
           }
 
           let win = yield openWebIDE();
           let docRuntime = getRuntimeDocument(win);
           let docProject = getProjectDocument(win);
 
           let panelNode = docRuntime.querySelector("#runtime-panel");
           let items = panelNode.querySelectorAll(".runtime-panel-item-other");
--- a/devtools/client/webide/test/test_device_preferences.html
+++ b/devtools/client/webide/test/test_device_preferences.html
@@ -16,17 +16,17 @@
 
     <script type="application/javascript">
       window.onload = function() {
         SimpleTest.waitForExplicitFinish();
 
         Task.spawn(function* () {
           if (!DebuggerServer.initialized) {
             DebuggerServer.init();
-            DebuggerServer.addBrowserActors();
+            DebuggerServer.registerActors({ browser: true, root: true, tab: true });
           }
 
           let win = yield openWebIDE();
 
           let prefIframe = win.document.querySelector("#deck-panel-devicepreferences");
           let docRuntime = getRuntimeDocument(win);
 
           win.AppManager.update("runtime-list");
--- a/devtools/client/webide/test/test_device_runtime.html
+++ b/devtools/client/webide/test/test_device_runtime.html
@@ -16,17 +16,17 @@
 
     <script type="application/javascript">
       window.onload = function() {
         SimpleTest.waitForExplicitFinish();
 
         Task.spawn(function* () {
           if (!DebuggerServer.initialized) {
             DebuggerServer.init();
-            DebuggerServer.addBrowserActors();
+            DebuggerServer.registerActors({ browser: true, root: true, tab: true });
           }
 
           let win = yield openWebIDE();
 
           let detailsIframe = win.document.querySelector("#deck-panel-runtimedetails");
 
           yield connectToLocalRuntime(win);
 
--- a/devtools/client/webide/test/test_runtime.html
+++ b/devtools/client/webide/test/test_runtime.html
@@ -36,17 +36,17 @@
           }
 
           function isStopActive() {
             return !win.document.querySelector("#cmd_stop").hasAttribute("disabled");
           }
 
           if (!DebuggerServer.initialized) {
             DebuggerServer.init();
-            DebuggerServer.addBrowserActors();
+            DebuggerServer.registerActors({ browser: true, root: true, tab: true });
           }
 
           win = yield openWebIDE();
           let docRuntime = getRuntimeDocument(win);
           let docProject = getProjectDocument(win);
           let winProject = getProjectWindow(win);
 
           let packagedAppLocation = getTestFilePath("app");
--- a/devtools/client/webide/test/test_toolbox.html
+++ b/devtools/client/webide/test/test_toolbox.html
@@ -28,17 +28,17 @@
             DebuggerServer.destroy();
             yield removeAllProjects();
           });
         });
 
         Task.spawn(function*() {
           if (!DebuggerServer.initialized) {
             DebuggerServer.init();
-            DebuggerServer.addBrowserActors();
+            DebuggerServer.registerActors({ browser: true, root: true, tab: true });
           }
 
           win = yield openWebIDE();
           let docRuntime = getRuntimeDocument(win);
           let docProject = getProjectDocument(win);
 
           win.AppManager.update("runtime-list");
 
--- a/devtools/docs/backend/actor-registration.md
+++ b/devtools/docs/backend/actor-registration.md
@@ -25,17 +25,17 @@ To register a global actor:
 ```
 DebuggerServer.registerModule("devtools/server/actors/addons", {
   prefix: "addons",
   constructor: "AddonsActor",
   type: { global: true }
 });
 ```
 
-If you are adding a new built-in devtools actor, you should be registering it using `DebuggerServer.registerModule` in `addBrowserActors` or `addTabActors` in `/devtools/server/main.js`.
+If you are adding a new built-in devtools actor, you should be registering it using `DebuggerServer.registerModule` in `_addBrowserActors` or `addTabActors` in `/devtools/server/main.js`.
 
 If you are adding a new actor from an add-on, you should call `DebuggerServer.registerModule` directly from your add-on code.
 
 ## A note about lazy registration
 
 The `DebuggerServer` 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 apps on b2g or 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/client-api.md
+++ b/devtools/docs/backend/client-api.md
@@ -9,17 +9,17 @@ In order to communicate, a client and a 
 ```javascript
 Components.utils.import("resource://gre/modules/devtools/dbg-server.jsm");
 Components.utils.import("resource://gre/modules/devtools/dbg-client.jsm");
 
 function start() {
   // Start the server.
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   // Listen to an nsIPipe
   let transport = DebuggerServer.connectPipe();
 
   // Start the client.
   client = new DebuggerClient(transport);
 
@@ -38,17 +38,17 @@ If a TCP socket is required, the functio
 ```javascript
 Components.utils.import("resource://gre/modules/devtools/dbg-server.jsm");
 Components.utils.import("resource://gre/modules/devtools/dbg-client.jsm");
 
 function startServer() {
   // Start the server.
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   // For an nsIServerSocket we do this:
   DebuggerServer.openListener(2929); // A connection on port 2929.
 }
 
 async function startClient() {
   let transport = await DebuggerClient.socketConnect({ host: "localhost", port: 2929 });
@@ -163,17 +163,17 @@ Components.utils.import("resource://gre/
 
 let client;
 let threadClient;
 
 function startDebugger() {
   // Start the server.
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
   // Listen to an nsIPipe
   let transport = DebuggerServer.connectPipe();
   // For an nsIServerSocket we do this:
   // DebuggerServer.openListener(port);
   // ...and this at the client:
   // let transport = debuggerSocketConnect(host, port);
 
--- 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/main.js`.
+To activate your actor, register it in the `_addBrowserActors` method in `server/main.js`.
 The registration code would look something like this:
 
     this.registerModule("devtools/server/actors/hello-world", {
       prefix: "hello",
       constructor: "HelloActor",
       type: { global: true }
     });
 
--- a/devtools/server/main.js
+++ b/devtools/server/main.js
@@ -267,25 +267,25 @@ var DebuggerServer = {
    */
   registerActors({ root = true, browser = true, tab = true,
                    windowType = null }) {
     if (windowType) {
       this.chromeWindowType = windowType;
     }
 
     if (browser) {
-      this.addBrowserActors(this.chromeWindowType);
+      this._addBrowserActors();
     }
 
-    if (root) {
+    if (browser || root) {
       this.registerModule("devtools/server/actors/webbrowser");
     }
 
-    if (tab) {
-      this.addTabActors();
+    if (browser || tab) {
+      this._addTabActors();
     }
   },
 
   /**
    * Load a subscript into the debugging global.
    *
    * @param url string A url that will be loaded as a subscript into the
    *        debugging global.  The user must load at least one script
@@ -413,60 +413,48 @@ var DebuggerServer = {
   },
 
   /**
    * Install Firefox-specific actors.
    *
    * /!\ Be careful when adding a new actor, especially global actors.
    * Any new global actor will be exposed and returned by the root actor.
    */
-  addBrowserActors(windowType = null) {
-    if (windowType) {
-      this.chromeWindowType = windowType;
-    }
-
-    this.registerModule("devtools/server/actors/webbrowser");
-
-    this.addTabActors();
-
+  _addBrowserActors() {
     this.registerModule("devtools/server/actors/preference", {
       prefix: "preference",
       constructor: "PreferenceActor",
       type: { global: true }
     });
-
     this.registerModule("devtools/server/actors/actor-registry", {
       prefix: "actorRegistry",
       constructor: "ActorRegistryActor",
       type: { global: true }
     });
-
     this.registerModule("devtools/server/actors/addons", {
       prefix: "addons",
       constructor: "AddonsActor",
       type: { global: true }
     });
-
     this.registerModule("devtools/server/actors/device", {
       prefix: "device",
       constructor: "DeviceActor",
       type: { global: true }
     });
-
     this.registerModule("devtools/server/actors/heap-snapshot-file", {
       prefix: "heapSnapshotFile",
       constructor: "HeapSnapshotFileActor",
       type: { global: true }
     });
   },
 
   /**
    * Install tab actors.
    */
-  addTabActors() {
+  _addTabActors() {
     this.registerModule("devtools/server/actors/webconsole", {
       prefix: "console",
       constructor: "WebConsoleActor",
       type: { tab: true }
     });
     this.registerModule("devtools/server/actors/inspector", {
       prefix: "inspector",
       constructor: "InspectorActor",
--- a/devtools/server/tests/browser/browser_register_actor.js
+++ b/devtools/server/tests/browser/browser_register_actor.js
@@ -4,17 +4,17 @@ var gClient;
 
 function test() {
   waitForExplicitFinish();
   let {ActorRegistryFront} = require("devtools/shared/fronts/actor-registry");
   let actorURL = "chrome://mochitests/content/chrome/devtools/server/tests/mochitest/hello-actor.js";
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   gClient = new DebuggerClient(DebuggerServer.connectPipe());
   gClient.connect()
     .then(() => gClient.listTabs())
     .then(response => {
       let options = {
         prefix: "helloActor",
--- a/devtools/server/tests/browser/head.js
+++ b/devtools/server/tests/browser/head.js
@@ -100,17 +100,17 @@ function initDebuggerServer() {
   try {
     // Sometimes debugger server does not get destroyed correctly by previous
     // tests.
     DebuggerServer.destroy();
   } catch (e) {
     info(`DebuggerServer destroy error: ${e}\n${e.stack}`);
   }
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 }
 
 /**
  * Connect a debugger client.
  * @param {DebuggerClient}
  * @return {Promise} Resolves to the selected tabActor form when the client is
  * connected.
  */
--- a/devtools/server/tests/mochitest/inspector-helpers.js
+++ b/devtools/server/tests/mochitest/inspector-helpers.js
@@ -20,17 +20,17 @@ const {_documentWalker} = require("devto
 // Always log packets when running tests.
 Services.prefs.setBoolPref("devtools.debugger.log", true);
 SimpleTest.registerCleanupFunction(function () {
   Services.prefs.clearUserPref("devtools.debugger.log");
 });
 
 if (!DebuggerServer.initialized) {
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   SimpleTest.registerCleanupFunction(function () {
     DebuggerServer.destroy();
   });
 }
 
 var gAttachCleanups = [];
 
 SimpleTest.registerCleanupFunction(function () {
--- a/devtools/server/tests/mochitest/memory-helpers.js
+++ b/devtools/server/tests/mochitest/memory-helpers.js
@@ -15,17 +15,17 @@ const { MemoryFront } = require("devtool
 // Always log packets when running tests.
 Services.prefs.setBoolPref("devtools.debugger.log", true);
 SimpleTest.registerCleanupFunction(function () {
   Services.prefs.clearUserPref("devtools.debugger.log");
 });
 
 function startServerAndGetSelectedTabMemory() {
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   let client = new DebuggerClient(DebuggerServer.connectPipe());
 
   return client.connect()
     .then(() => client.listTabs())
     .then(response => {
       let form = response.tabs[response.selected];
       let memory = MemoryFront(client, form, response);
 
--- a/devtools/server/tests/mochitest/test_connectToChild.html
+++ b/devtools/server/tests/mochitest/test_connectToChild.html
@@ -72,17 +72,17 @@ function runTests() {
     DebuggerServer.addTabActor(TestActor, "testActor");
   }, false);
 
   // Instantiate a minimal server
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
   }
   if (!DebuggerServer.createRootActor) {
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   function firstClient() {
     // Fake a first connection to an iframe
     let transport = DebuggerServer.connectPipe();
     let conn = transport._serverConnection;
     let client = new DebuggerClient(transport);
     DebuggerServer.connectToChild(conn, iframe).then(actor => {
--- a/devtools/server/tests/mochitest/test_connection-manager.html
+++ b/devtools/server/tests/mochitest/test_connection-manager.html
@@ -20,17 +20,17 @@ window.onload = function () {
   const Cu = Components.utils;
 
   const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
   const {DebuggerServer} = require("devtools/server/main");
   const Services = require("Services");
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   const {
     ConnectionManager,
     Connection
   } = require("devtools/shared/client/connection-manager");
 
   let orgCount = ConnectionManager.connections.length;
--- a/devtools/server/tests/mochitest/test_device.html
+++ b/devtools/server/tests/mochitest/test_device.html
@@ -24,17 +24,17 @@ window.onload = function () {
   const Services = require("Services");
 
   SimpleTest.waitForExplicitFinish();
 
   const {getDeviceFront} = require("devtools/shared/fronts/device");
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function onConnect() {
     client.listTabs(function onListTabs(response) {
       let d = getDeviceFront(client, response);
 
       let desc;
--- a/devtools/server/tests/mochitest/test_framerate_01.html
+++ b/devtools/server/tests/mochitest/test_framerate_01.html
@@ -64,17 +64,17 @@ window.onload = function () {
       prevTime = currTime;
     }
 
     return timeline;
   }
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function onConnect() {
     client.listTabs(function onListTabs(response) {
       let form = response.tabs[response.selected];
       let front = FramerateFront(client, form);
 
--- a/devtools/server/tests/mochitest/test_framerate_02.html
+++ b/devtools/server/tests/mochitest/test_framerate_02.html
@@ -64,17 +64,17 @@ window.onload = function () {
       prevTime = currTime;
     }
 
     return timeline;
   }
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function onConnect() {
     client.listTabs(function onListTabs(response) {
       let form = response.tabs[response.selected];
       let front = FramerateFront(client, form);
 
--- a/devtools/server/tests/mochitest/test_framerate_03.html
+++ b/devtools/server/tests/mochitest/test_framerate_03.html
@@ -32,17 +32,17 @@ window.onload = function () {
 
   const {FramerateFront} = require("devtools/shared/fronts/framerate");
   const START_TICK = 2000;
   const STOP_TICK = 3000;
   const TOTAL_TIME = 5000;
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function onConnect() {
     client.listTabs(function onListTabs(response) {
       let form = response.tabs[response.selected];
       let front = FramerateFront(client, form);
 
--- a/devtools/server/tests/mochitest/test_framerate_05.html
+++ b/devtools/server/tests/mochitest/test_framerate_05.html
@@ -28,17 +28,17 @@ window.onload = function () {
     Services.prefs.clearUserPref("devtools.debugger.log");
   });
 
   SimpleTest.waitForExplicitFinish();
 
   const {FramerateFront} = require("devtools/shared/fronts/framerate");
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function onConnect() {
     client.listTabs(function onListTabs(response) {
       let form = response.tabs[response.selected];
       let front = FramerateFront(client, form);
 
       front.startRecording().then(() => {
--- a/devtools/server/tests/mochitest/test_getProcess.html
+++ b/devtools/server/tests/mochitest/test_getProcess.html
@@ -38,17 +38,17 @@ window.onload = function () {
 
 function runTests() {
   // Instantiate a minimal server
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
   }
   DebuggerServer.allowChromeProcess = true;
   if (!DebuggerServer.createRootActor) {
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   let client, iframe, processCount;
 
   function connect() {
     // Fake a first connection to the content process
     let transport = DebuggerServer.connectPipe();
     client = new DebuggerClient(transport);
--- a/devtools/server/tests/mochitest/test_preference.html
+++ b/devtools/server/tests/mochitest/test_preference.html
@@ -23,17 +23,17 @@ function runTests() {
   let {DebuggerServer} = require("devtools/server/main");
   let Services = require("Services");
 
   SimpleTest.waitForExplicitFinish();
 
   let {getPreferenceFront} = require("devtools/shared/fronts/preference");
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function onConnect() {
     client.listTabs(function onListTabs(response) {
       let p = getPreferenceFront(client, response);
 
       let prefs = {};
 
--- a/devtools/server/tests/mochitest/test_setupInParentChild.html
+++ b/devtools/server/tests/mochitest/test_setupInParentChild.html
@@ -41,17 +41,17 @@ function runTests() {
   iframe.mozbrowser = true;
   document.body.appendChild(iframe);
 
   // Instantiate a minimal server
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
   }
   if (!DebuggerServer.createRootActor) {
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
 
   // Fake a connection to an iframe
   let transport = DebuggerServer.connectPipe();
   let conn = transport._serverConnection;
   let client = new DebuggerClient(transport);
 
   // Wait for a response from setupInChild
--- a/devtools/server/tests/mochitest/webconsole-helpers.js
+++ b/devtools/server/tests/mochitest/webconsole-helpers.js
@@ -12,17 +12,17 @@ const Services = require("Services");
 // Always log packets when running tests.
 Services.prefs.setBoolPref("devtools.debugger.log", true);
 SimpleTest.registerCleanupFunction(function () {
   Services.prefs.clearUserPref("devtools.debugger.log");
 });
 
 if (!DebuggerServer.initialized) {
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   SimpleTest.registerCleanupFunction(function () {
     DebuggerServer.destroy();
   });
 }
 
 /**
  * Open a tab, load the url, find the tab with the debugger server,
  * and attach the console to it.
--- a/devtools/server/tests/mochitest/webextension-helpers.js
+++ b/devtools/server/tests/mochitest/webextension-helpers.js
@@ -17,17 +17,17 @@ const {flushJarCache} = require("resourc
 const {Services} = require("resource://gre/modules/Services.jsm");
 
 loader.lazyImporter(this, "ExtensionParent", "resource://gre/modules/ExtensionParent.jsm");
 loader.lazyImporter(this, "OS", "resource://gre/modules/osfile.jsm");
 
 // Initialize a minimal DebuggerServer and connect to the webextension addon actor.
 if (!DebuggerServer.initialized) {
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   SimpleTest.registerCleanupFunction(function () {
     DebuggerServer.destroy();
   });
 }
 
 SimpleTest.registerCleanupFunction(function () {
   const {hiddenXULWindow} = ExtensionParent.DebugUtils;
   const debugBrowserMapSize = ExtensionParent.DebugUtils.debugBrowserPromises.size;
--- a/devtools/server/tests/unit/head_dbg.js
+++ b/devtools/server/tests/unit/head_dbg.js
@@ -415,17 +415,17 @@ function initTestDebuggerServer(server =
 }
 
 /**
  * Initialize the testing debugger server with a tab whose title is |title|.
  */
 function startTestDebuggerServer(title, server = DebuggerServer) {
   initTestDebuggerServer(server);
   addTestGlobal(title);
-  DebuggerServer.addTabActors();
+  DebuggerServer.registerActors({ browser: false, root: false, tab: true });
 
   let transport = DebuggerServer.connectPipe();
   let client = new DebuggerClient(transport);
 
   return connect(client).then(() => client);
 }
 
 function finishClient(client) {
@@ -435,17 +435,17 @@ function finishClient(client) {
   });
 }
 
 // Create a server, connect to it and fetch tab actors for the parent process;
 // pass |callback| the debugger client and tab actor form with all actor IDs.
 function get_chrome_actors(callback) {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
   DebuggerServer.allowChromeProcess = true;
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect()
     .then(() => client.getProcess())
     .then(response => {
       callback(client, response.form);
--- a/devtools/server/tests/unit/test_actor-registry-actor.js
+++ b/devtools/server/tests/unit/test_actor-registry-actor.js
@@ -13,17 +13,17 @@ var gActorFront;
 var gOldPref;
 
 const { ActorRegistryFront } = require("devtools/shared/fronts/actor-registry");
 
 function run_test() {
   gOldPref = Services.prefs.getBoolPref("devtools.debugger.forbid-certified-apps");
   Services.prefs.setBoolPref("devtools.debugger.forbid-certified-apps", false);
   initTestDebuggerServer();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   gClient = new DebuggerClient(DebuggerServer.connectPipe());
   gClient.connect().then(getRegistry);
   do_test_pending();
 }
 
 function getRegistry() {
   gClient.listTabs((response) => {
     gRegistryFront = ActorRegistryFront(gClient, response);
--- a/devtools/server/tests/unit/test_add_actors.js
+++ b/devtools/server/tests/unit/test_add_actors.js
@@ -13,17 +13,17 @@ var gActors;
  * in order to add actors after initialization but rather can add actors anytime
  * regardless of the object's state.
  */
 function run_test() {
   DebuggerServer.addActors("resource://test/pre_init_global_actors.js");
   DebuggerServer.addActors("resource://test/pre_init_tab_actors.js");
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   DebuggerServer.addActors("resource://test/post_init_global_actors.js");
   DebuggerServer.addActors("resource://test/post_init_tab_actors.js");
 
   add_test(init);
   add_test(test_pre_init_global_actor);
   add_test(test_pre_init_tab_actor);
   add_test(test_post_init_global_actor);
--- a/devtools/server/tests/unit/test_client_request.js
+++ b/devtools/server/tests/unit/test_client_request.js
@@ -25,17 +25,17 @@ TestActor.prototype.requestTypes = {
   "hello": TestActor.prototype.hello,
   "error": TestActor.prototype.error
 };
 
 function run_test() {
   DebuggerServer.addGlobalActor(TestActor);
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   add_test(init);
   add_test(test_client_request_callback);
   add_test(test_client_request_promise);
   add_test(test_client_request_promise_error);
   add_test(test_client_request_event_emitter);
   add_test(test_close_client_while_sending_requests);
   add_test(test_client_request_after_close);
--- a/devtools/server/tests/unit/test_eventlooplag_actor.js
+++ b/devtools/server/tests/unit/test_eventlooplag_actor.js
@@ -6,17 +6,17 @@
  */
 
 "use strict";
 
 function run_test() {
   let {EventLoopLagFront} = require("devtools/shared/fronts/eventlooplag");
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   // As seen in EventTracer.cpp
   let threshold = 20;
   let interval = 10;
 
   let front;
   let client = new DebuggerClient(DebuggerServer.connectPipe());
 
--- a/devtools/server/tests/unit/test_registerClient.js
+++ b/devtools/server/tests/unit/test_registerClient.js
@@ -49,17 +49,17 @@ TestClient.prototype = {
     onDone();
   }
 };
 
 function run_test() {
   DebuggerServer.addGlobalActor(TestActor);
 
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   add_test(init);
   add_test(test_client_events);
   add_test(close_client);
   run_next_test();
 }
 
 function init() {
--- a/devtools/server/tests/unit/test_register_actor.js
+++ b/devtools/server/tests/unit/test_register_actor.js
@@ -13,17 +13,17 @@ function check_actors(expect) {
               DebuggerServer.globalActorFactories.hasOwnProperty("registeredActor2"));
   do_check_eq(expect,
               DebuggerServer.globalActorFactories.hasOwnProperty("registeredActor1"));
 }
 
 function run_test() {
   // Allow incoming connections.
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   add_test(test_deprecated_api);
   add_test(test_lazy_api);
   add_test(cleanup);
   run_next_test();
 }
 
 function test_deprecated_api() {
--- a/devtools/server/tests/unit/test_requestTypes.js
+++ b/devtools/server/tests/unit/test_requestTypes.js
@@ -18,17 +18,17 @@ function test_requestTypes_request(clien
     client.close().then(() => {
       do_test_finished();
     });
   });
 }
 
 function run_test() {
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function () {
     test_requestTypes_request(client);
   });
 
   do_test_pending();
 }
--- a/devtools/shared/gcli/commands/listen.js
+++ b/devtools/shared/gcli/commands/listen.js
@@ -22,17 +22,17 @@ XPCOMUtils.defineLazyGetter(this, "debug
   // devtools.  This allows us to safely use the tools against even the
   // actors and DebuggingServer itself, especially since we can mark
   // serverLoader as invisible to the debugger (unlike the usual loader
   // settings).
   let serverLoader = new DevToolsLoader();
   serverLoader.invisibleToDebugger = true;
   let { DebuggerServer: debuggerServer } = serverLoader.require("devtools/server/main");
   debuggerServer.init();
-  debuggerServer.addBrowserActors();
+  debuggerServer.registerActors({ browser: true, root: true, tab: true });
   debuggerServer.allowChromeProcess = !l10n.hiddenByChromePref();
   return debuggerServer;
 });
 
 exports.items = [
   {
     item: "command",
     runAt: "client",
--- a/devtools/shared/security/tests/chrome/test_websocket-transport.html
+++ b/devtools/shared/security/tests/chrome/test_websocket-transport.html
@@ -23,17 +23,17 @@ window.onload = function () {
   SimpleTest.registerCleanupFunction(() => {
     Services.prefs.clearUserPref("devtools.debugger.remote-enabled");
     Services.prefs.clearUserPref("devtools.debugger.prompt-connection");
   });
 
   add_task(function* () {
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors();
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     }
 
     is(DebuggerServer.listeningSockets, 0, "0 listening sockets");
 
     let listener = DebuggerServer.createListener();
     ok(listener, "Socket listener created");
     listener.portOrPath = -1;
     listener.webSocket = true;
--- a/devtools/shared/webconsole/test/common.js
+++ b/devtools/shared/webconsole/test/common.js
@@ -22,17 +22,17 @@ const Services = require("Services");
 
 function initCommon() {
   // Services.prefs.setBoolPref("devtools.debugger.log", true);
 }
 
 function initDebuggerServer() {
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   }
   DebuggerServer.allowChromeProcess = true;
 }
 
 function connectToDebugger() {
   initCommon();
   initDebuggerServer();
 
--- a/devtools/shim/devtools-startup.js
+++ b/devtools/shim/devtools-startup.js
@@ -764,17 +764,17 @@ DevToolsStartup.prototype = {
       // actors and DebuggingServer itself, especially since we can mark
       // serverLoader as invisible to the debugger (unlike the usual loader
       // settings).
       let serverLoader = new DevToolsLoader();
       serverLoader.invisibleToDebugger = true;
       let { DebuggerServer: debuggerServer } =
         serverLoader.require("devtools/server/main");
       debuggerServer.init();
-      debuggerServer.addBrowserActors();
+      debuggerServer.registerActors({ browser: true, root: true, tab: true });
       debuggerServer.allowChromeProcess = true;
 
       let listener = debuggerServer.createListener();
       listener.portOrPath = portOrPath;
       listener.webSocket = webSocket;
       listener.open();
       dump("Started debugger server on " + portOrPath + "\n");
     } catch (e) {
--- a/mobile/android/chrome/content/RemoteDebugger.js
+++ b/mobile/android/chrome/content/RemoteDebugger.js
@@ -178,17 +178,17 @@ var RemoteDebugger = {
   initServer: function() {
     if (DebuggerServer.initialized) {
       return;
     }
 
     DebuggerServer.init();
 
     // Add browser and Fennec specific actors
-    DebuggerServer.addBrowserActors();
+    DebuggerServer.registerActors({ browser: true, root: true, tab: true });
     DebuggerServer.registerModule("resource://gre/modules/dbg-browser-actors.js");
 
     // Allow debugging of chrome for any process
     DebuggerServer.allowChromeProcess = true;
   }
 };
 
 RemoteDebugger.allowConnection =
--- a/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
@@ -40,17 +40,19 @@ class GeckoViewRemoteDebugger extends Ge
     } else if (!enabled) {
       this.unregister();
     }
   }
 
   register() {
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
-      DebuggerServer.addBrowserActors("navigator:geckoview");
+
+      let windowType = "navigator:geckoview";
+      DebuggerServer.registerActors({ browser: true, root: true, tab: true, windowType });
       DebuggerServer.registerModule(
         "resource://gre/modules/dbg-browser-actors.js");
       DebuggerServer.allowChromeProcess = true;
     }
 
     let windowId = this.window.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIDOMWindowUtils)
                               .outerWindowID;
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -406,17 +406,17 @@ function _setupDebuggerServer(breakpoint
                     "It is possible for this to alter test behevior by " +
                     "triggering additional browser code to run, so check " +
                     "test behavior after making this change.\n" +
                     "See also https://bugzil.la/1215378.");
   }
   let { DebuggerServer } = require("devtools/server/main");
   let { OriginalLocation } = require("devtools/server/actors/common");
   DebuggerServer.init();
-  DebuggerServer.addBrowserActors();
+  DebuggerServer.registerActors({ browser: true, root: true, tab: true });
   DebuggerServer.addActors("resource://testing-common/dbg-actors.js");
   DebuggerServer.allowChromeProcess = true;
 
   // An observer notification that tells us when we can "resume" script
   // execution.
   let obsSvc = Components.classes["@mozilla.org/observer-service;1"].
                getService(Components.interfaces.nsIObserverService);