Bug 1382968 - Flag Browser Console target as being chrome and related to a TabActor. r=jryans
☠☠ backed out by 309b1b63eb48 ☠ ☠
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 07 Aug 2017 18:47:20 +0200
changeset 373333 5a2260bc98ca
parent 373332 869a9b46b5cc
child 373334 e25b4bd21ac8
push id48228
push userapoirot@mozilla.com
push dateTue, 08 Aug 2017 10:15:47 +0000
treeherderautoland@e25b4bd21ac8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1382968
milestone57.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 1382968 - Flag Browser Console target as being chrome and related to a TabActor. r=jryans The Browser Console interacts with a ChromeActor instance, which as any TabActor inherited actor, expects to be "attached" by calling its `attach` request. isTabActor set to true ensures that. While chrome set to true allows client codebase to enable additional behavior for chrome debugging. MozReview-Commit-ID: 1MVLBKnluhg
devtools/client/webconsole/hudservice.js
--- a/devtools/client/webconsole/hudservice.js
+++ b/devtools/client/webconsole/hudservice.js
@@ -184,19 +184,18 @@ HUD_SERVICE.prototype =
         DebuggerServer.addBrowserActors();
       }
       DebuggerServer.allowChromeProcess = true;
 
       let client = new DebuggerClient(DebuggerServer.connectPipe());
       return client.connect()
         .then(() => client.getProcess())
         .then(aResponse => {
-          // Set chrome:false in order to attach to the target
-          // (i.e. send an `attach` request to the chrome actor)
-          return { form: aResponse.form, client: client, chrome: false };
+          // Use a TabActor in order to ensure calling `attach` to the ChromeActor
+          return { form: aResponse.form, client, chrome: true, isTabActor: true };
         });
     }
 
     let target;
     function getTarget(aConnection)
     {
       return TargetFactory.forRemoteTab(aConnection);
     }