Bug 1382968 - Flag Browser Console target as being chrome and related to a TabActor. r=jryans
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 07 Aug 2017 18:47:20 +0200
changeset 373670 d0b89a730143
parent 373669 cfc57926a26a
child 373671 5380b3782099
push id48384
push userapoirot@mozilla.com
push dateWed, 09 Aug 2017 21:16:59 +0000
treeherderautoland@ab16c50f1c29 [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
@@ -185,19 +185,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);
     }