Closed
Bug 1263140
Opened 9 years ago
Closed 9 years ago
Fix notified button name in SDK native-options module
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(firefox48 fixed)
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
Details
Attachments
(1 file)
Unfortunately the jetpack test suite didn't catched that in the changes introduced by Bug 1167246 the name of the button is now used in a closure and the command handler of the add-on preferences button will notify the wrong preference name if the button is not the last element of the preferences array.
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/45263/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45263/
Attachment #8739411 -
Flags: review?(dtownsend)
Comment 2•9 years ago
|
||
Comment on attachment 8739411 [details]
MozReview Request: Bug 1263140 - fix notified button name in SDK native-options module. r=mossop
https://reviewboard.mozilla.org/r/45263/#review41755
::: addon-sdk/source/lib/sdk/preferences/native-options.js:136
(Diff revision 1)
> // dynamically injects inline options into about:addons page at runtime
> // NOTE: on Firefox Desktop the about:addons page is a xul page document,
> // on Firefox for Android the about:addons page is an xhtml page, to support both
> // the XUL xml namespace have to be enforced.
> function injectOptions({ preferences, preferencesBranch, document, parent, id }) {
> for (let { name, type, hidden, title, description, label, options, on, off } of preferences) {
Can you instead make this
preferences.forEach(({name, type, hidden, title, description, label, options, on, off}) => {
...
});
That should solve the issue and make sure it doesn't catch us elsewhere.
Attachment #8739411 -
Flags: review?(dtownsend) → review+
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Dave Townsend [:mossop] from comment #2)
> Comment on attachment 8739411 [details]
> MozReview Request: Bug 1263140 - fix notified button name in SDK
> native-options module. r?mossop
>
> https://reviewboard.mozilla.org/r/45263/#review41755
>
> ::: addon-sdk/source/lib/sdk/preferences/native-options.js:136
> (Diff revision 1)
> > // dynamically injects inline options into about:addons page at runtime
> > // NOTE: on Firefox Desktop the about:addons page is a xul page document,
> > // on Firefox for Android the about:addons page is an xhtml page, to support both
> > // the XUL xml namespace have to be enforced.
> > function injectOptions({ preferences, preferencesBranch, document, parent, id }) {
> > for (let { name, type, hidden, title, description, label, options, on, off } of preferences) {
>
> Can you instead make this
>
> preferences.forEach(({name, type, hidden, title, description, label,
> options, on, off}) => {
> ...
> });
>
> That should solve the issue and make sure it doesn't catch us elsewhere.
sure, and I like it more than my proposed one.
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8739411 [details]
MozReview Request: Bug 1263140 - fix notified button name in SDK native-options module. r=mossop
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45263/diff/1-2/
Attachment #8739411 -
Attachment description: MozReview Request: Bug 1263140 - fix notified button name in SDK native-options module. r?mossop → MozReview Request: Bug 1263140 - fix notified button name in SDK native-options module. r=mossop
Assignee | ||
Comment 5•9 years ago
|
||
https://reviewboard.mozilla.org/r/45263/#review41755
> Can you instead make this
>
> preferences.forEach(({name, type, hidden, title, description, label, options, on, off}) => {
> ...
> });
>
> That should solve the issue and make sure it doesn't catch us elsewhere.
Patch updated as suggested in the review comment.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•9 years ago
|
||
Pushed to try:
- https://treeherder.mozilla.org/#/jobs?repo=try&revision=87d9d53ffc8c
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 8•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•