Closed Bug 562848 Opened 14 years ago Closed 14 years ago

Lightweight themes without descriptions display undefined for text (error console - Warning: reference to undefined property aTheme[prop])

Categories

(Toolkit :: Add-ons Manager, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.3a5

People

(Reporter: Unfocused, Assigned: robert.strong.bugs)

References

Details

(Whiteboard: [rewrite])

Attachments

(1 file, 1 obsolete file)

Some lightweight themes don't have descriptions. However, the Addon objects the LightweightThemeManager provides doesn't take this into account. When getting the description for such a lightweight theme, it tries to access an undefined property - resulting in a JS warning and the description getter returning undefined, instead of an empty string.


Warning: reference to undefined property aTheme[prop]
Source File:
file:///C:/Program%20Files%20(x86)/Minefield/modules/LightweightThemeManager.jsm
Line: 398

(Originally from bug 562765 comment 3)
Attached patch patch rev1 (obsolete) — Splinter Review
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #442627 - Flags: review?(dtownsend)
Summary: Lightweight themes without descriptions return an undefined property when getting the description → Lightweight themes without descriptions display undefined for text (error console - Warning: reference to undefined property aTheme[prop])
Priority: -- → P1
Dave, I went with the optional list in the global scope to decide which should be optional. It does seem that version should not be optional to me but I don't know the light weight themes implementation all that well.
Comment on attachment 442627 [details] [diff] [review]
patch rev1

Make the version property return "" when not set (according to toolkit version rules that is the same as "0" but won't display as badly I think). Also please use |prop in aTheme| as the test or we'll still emit strict JS errors I think.
Attachment #442627 - Flags: review?(dtownsend) → review-
Attached patch patch - like so?Splinter Review
btw: it displays 'Version' without a version number for lightweight themes.
Attachment #442627 - Attachment is obsolete: true
Attachment #443727 - Flags: review?(dtownsend)
Comment on attachment 443727 [details] [diff] [review]
patch - like so?

Looks good thanks.
Attachment #443727 - Flags: review?(dtownsend) → review+
http://hg.mozilla.org/projects/addonsmgr/rev/dd337a8ff851
Whiteboard: [rewrite] → [rewrite][fixed-in-addonsmgr][needs-landing]
http://hg.mozilla.org/mozilla-central/rev/6884244e3f75
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-landing] → [rewrite]
Target Milestone: --- → mozilla1.9.3a5
Any chance to verify that fix? Blair, have you used a special persona? How can I easily find one which doesn't have a description?
Flags: in-testsuite?
Flags: in-litmus?
Version: unspecified → Trunk
Sorry, I don't have any example persona for this (I don't think I ever saw this myself). Maybe Rob Strong can remember which persona he used?
Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a5pre) Gecko/20100523 Minefield/3.7a5pre ID:20100523030649

Could we combine the Litmus test with the one on bug 562765? Would it be enough to test a personas only or do we also have to create an example XPI?
Status: RESOLVED → VERIFIED
(In reply to comment #13)
> You can - see bug 562765 comment #27

Blair will work on an automated test. If it doesn't succeed I will hop-on and create a Mozmill test.
Flags: in-litmus? → in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: