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
--- 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);
}