Invalid value in devtools.toolbox.toolbarSpec breaks Toolbox buttons

VERIFIED FIXED in Firefox 54

Status

DevTools
Framework
P2
normal
VERIFIED FIXED
2 years ago
a month ago

People

(Reporter: sebo, Assigned: ochameau)

Tracking

(Blocks: 1 bug)

53 Branch
Firefox 54
Dependency tree / graph

Firefox Tracking Flags

(firefox53 wontfix, firefox54 fixed)

Details

(Reporter)

Description

2 years ago
An invalid value for the devtools.toolbox.toolbarSpec preference breaks the Toolbox buttons including the Inspector button.

In my case the preference within prefs.js looked like this:

user_pref("devtools.toolbox.toolbarSpec", "[\"firebug open\", \"paintflashing toggle\", \"tilt toggle\", \"scratchpad\", \"resize toggle\"]");

The following related exception is shown within the Browser Toolbox:

Error: No command 'firebug open'
Stack trace:
createCommandButtons/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/developer-toolbar.js:92:17
...

(Regarding the exception's stack trace, it looks like this bug is related to the GCLI code, though as it breaks the Toolbox buttons I put it in the "Framework" component.)

Sebastian
Do you how you arrived at the invalid value?  Is this something the Firebug add-on would add?
Flags: needinfo?(sebastianzartner)
(Reporter)

Comment 2

2 years ago
Firebug at least adds some GCLI commands[1], but it doesn't add that entry by default and unfortunately I can't tell you how I arrived at the invalid value. I can just tell you that I did not edit the value manually.

Independent of that question, this also happens for other invalid values like "[\"foo\"]".

Maybe the dependency on that preference should be removed completely, as the sense behind it seems to be questionable.

Sebastian

[1] https://github.com/firebug/firebug/blob/313e5bece064c0fb0ab7db123a38ba3b90dfc922/extension/modules/gcli.js#L146-L182
Flags: needinfo?(sebastianzartner)
At the very least, it would seem we should just ignore an invalid item in the array, to avoid breaking the toolbox.

:ochameau, it seem you are changing some related things in bug 1320149.  Is the toolbarSpec pref still used after your changes?
Flags: needinfo?(poirot.alex)
(Assignee)

Comment 4

2 years ago
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #3)
> :ochameau, it seem you are changing some related things in bug 1320149.  Is
> the toolbarSpec pref still used after your changes?

No. It looks like I can also cleanup this toolbarSpec related code.
So if I move forward with bug 1320149 as-is, this bug won't exist anymore.
Flags: needinfo?(poirot.alex)
Priority: -- → P2
Bug 1320149 removed toolbarSpec, so this issue seems fixed.
Assignee: nobody → poirot.alex
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox53: affected → wontfix
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
(Reporter)

Comment 6

2 years ago
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #5)
> Bug 1320149 removed toolbarSpec, so this issue seems fixed.

Yes, I can confirm that. Thank you for closing that bug!

Sebastian
Status: RESOLVED → VERIFIED

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.