Last Comment Bug 861192 - gcli addon command shows [object Object] instead of a list of addons
: gcli addon command shows [object Object] instead of a list of addons
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Graphic Commandline and Toolbar (show other bugs)
: 23 Branch
: All All
: -- normal (vote)
: Firefox 23
Assigned To: Josh Marchán
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-12 07:41 PDT by Frederik Braun [:freddyb]
Modified: 2013-05-14 16:50 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
reviving and modernizing addon list (13.97 KB, patch)
2013-04-15 21:07 PDT, Josh Marchán
no flags Details | Diff | Review
v2 (13.96 KB, patch)
2013-04-17 05:10 PDT, Josh Marchán
mratcliffe: review+
Details | Diff | Review

Description Frederik Braun [:freddyb] 2013-04-12 07:41:23 PDT
I opened the gcli (Shift+F2) and typed "addon list".

Expected Result:
a list of all addons.

Actual Result:
The string "[object Object]" was displayed
Comment 1 Frederik Braun [:freddyb] 2013-04-12 07:52:50 PDT
Still exists on nightly.
Comment 2 Josh Marchán 2013-04-15 21:07:07 PDT
Created attachment 737812 [details] [diff] [review]
reviving and modernizing addon list

This should revive the command -- I took the chance to split it into a command and a converter, and putting a bit of spit and polish on the listing itself. Once bug 855124 lands, I'd like to also add a Prefs button to the listing, which should be simple and quick. A simpler fix could've been to just add returnType: "view" to the command, but that would be boring! :) (but doable if requested)

Joe: I might owe you test cases for this. Still trying to figure out how tests work, and try access is still not quite there (relevant bug reopened, hopefully it was just my mistake)
Comment 3 Joe Walker [:jwalker] (needinfo me or ping on irc) 2013-04-17 02:24:45 PDT
Comment on attachment 737812 [details] [diff] [review]
reviving and modernizing addon list

Review of attachment 737812 [details] [diff] [review]:
-----------------------------------------------------------------

I'm holding Mike up on a bug, and he originally wrote the add-on command, so I'm going to bounce the r? to him.
Comment 4 Michael Ratcliffe [:miker] [:mratcliffe] 2013-04-17 04:13:05 PDT
Comment on attachment 737812 [details] [diff] [review]
reviving and modernizing addon list

Review of attachment 737812 [details] [diff] [review]:
-----------------------------------------------------------------

This looks excellent and the refactoring was very welcome.

The test still passes fine so there is nothing for you to do there:
./mach mochitest-browser browser/devtools/commandline/test/browser_cmd_addon.js

The one problem is that if you use the enable / disable buttons on an addon that has no version number (e.g. Shockwave Flash) then the addon name in the commandline has an extra _ so it fails to disable:
addon disable Shockwave_Flash_

Once you fix that I will give you an r+.
Comment 5 Josh Marchán 2013-04-17 05:10:02 PDT
Created attachment 738448 [details] [diff] [review]
v2

Oops! Good catch, and thanks for the mochitest incantation, I meant to ask how to do that. :)
Comment 6 Michael Ratcliffe [:miker] [:mratcliffe] 2013-04-17 07:57:47 PDT
Comment on attachment 738448 [details] [diff] [review]
v2

Review of attachment 738448 [details] [diff] [review]:
-----------------------------------------------------------------

Magnifico, r+
Comment 7 Panos Astithas [:past] 2013-04-18 07:15:01 PDT
https://hg.mozilla.org/integration/fx-team/rev/a7e584370ab9
Comment 8 Tim Taubert [:ttaubert] 2013-04-19 00:43:40 PDT
https://hg.mozilla.org/mozilla-central/rev/a7e584370ab9

Note You need to log in before you can comment on or make changes to this bug.