Bug 1757744 - [devtools] Show custom toolbox title for XPCShell debugging r=nchevobbe

Note that XPCShell debugging is usually done via an about:devtools-toolbox tab, so most of the time there will be no title like this.
But we could enable BrowserToolbox xpcshell debugging via https://bugzilla.mozilla.org/show_bug.cgi?id=1620942 and in the meantime this will make it easier to spot configuration issues.

Differential Revision: https://phabricator.services.mozilla.com/D140063
This commit is contained in:
Julian Descottes 2022-03-02 16:50:13 +00:00
Родитель 8f7d6eaa66
Коммит a9045a9bb2
3 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -3235,7 +3235,11 @@ Toolbox.prototype = {
this.isBrowserToolbox &&
Services.prefs.getBoolPref("devtools.browsertoolbox.fission", false);
if (isMultiProcessBrowserToolbox) {
if (this.target.isXpcShellTarget) {
// This will only be displayed for local development and can remain
// hardcoded in english.
title = "XPCShell Toolbox";
} else if (isMultiProcessBrowserToolbox) {
title = L10N.getStr("toolbox.multiProcessBrowserToolboxTitle");
} else if (this.target.name && this.target.name != this.target.url) {
const url = this.target.isWebExtension

Просмотреть файл

@ -30,6 +30,7 @@ class ContentProcessTargetFront extends TargetMixin(
this.targetForm = json;
this.remoteType = json.remoteType;
this.isXpcShellTarget = json.isXpcShellTarget;
}
get name() {

Просмотреть файл

@ -152,10 +152,11 @@ const ContentProcessTargetActor = TargetActorMixin(
return {
actor: this.actorID,
consoleActor: this._consoleActor.actorID,
threadActor: this.threadActor.actorID,
isXpcShellTarget: this.isXpcShellTarget,
memoryActor: this.memoryActor.actorID,
processID: Services.appinfo.processID,
remoteType: Services.appinfo.remoteType,
threadActor: this.threadActor.actorID,
traits: {
networkMonitor: false,