mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1088247 - A developer tool should only be enabled when appropriate actors exist. r=jryans
This commit is contained in:
parent
b17ce55303
commit
338b843a08
@ -117,7 +117,7 @@ Tools.inspector = {
|
||||
},
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return !target.isAddon;
|
||||
return !target.isAddon && target.hasActor("inspector");
|
||||
},
|
||||
|
||||
build: function(iframeWindow, toolbox) {
|
||||
@ -199,7 +199,8 @@ Tools.styleEditor = {
|
||||
commands: "devtools/styleeditor/styleeditor-commands",
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return !target.isAddon;
|
||||
return !target.isAddon &&
|
||||
(target.hasActor("styleEditor") || target.hasActor("styleSheets"));
|
||||
},
|
||||
|
||||
build: function(iframeWindow, toolbox) {
|
||||
@ -267,7 +268,7 @@ Tools.jsprofiler = {
|
||||
isTargetSupported: function (target) {
|
||||
// Hide the profiler when debugging devices pre bug 1046394,
|
||||
// that don't expose profiler actor in content processes.
|
||||
return !target.isAddon && (!target.isApp || target.form.profilerActor);
|
||||
return !target.isAddon && target.hasActor("profiler");
|
||||
},
|
||||
|
||||
build: function (frame, target) {
|
||||
@ -291,9 +292,7 @@ Tools.performance = {
|
||||
inMenu: true,
|
||||
|
||||
isTargetSupported: function (target) {
|
||||
// Hide the profiler when debugging devices pre bug 1046394,
|
||||
// that don't expose profiler actor in content processes.
|
||||
return !target.isAddon && (!target.isApp || target.form.profilerActor);
|
||||
return !target.isAddon && target.hasActor("profiler");
|
||||
},
|
||||
|
||||
build: function (frame, target) {
|
||||
@ -338,8 +337,7 @@ Tools.netMonitor = {
|
||||
inMenu: true,
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
let root = target.client.mainRoot;
|
||||
return !target.isAddon && (root.traits.networkMonitor || !target.isApp);
|
||||
return !target.isAddon && target.getTrait("networkMonitor");
|
||||
},
|
||||
|
||||
build: function(iframeWindow, toolbox) {
|
||||
|
Loading…
Reference in New Issue
Block a user