Closed Bug 374101 Opened 18 years ago Closed 18 years ago

clean up some strict js warnings and errors

Categories

(Thunderbird :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3

People

(Reporter: mkmelin, Assigned: mkmelin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch proposed fixSplinter Review
You can get quite a few strict js warnings and a few unharmful js errors clicking around in tb. The attached patch fixes at least part of them, it contains no functional change in practice. The only "real change" is to set mail.citation_color to black by default - which it is in reality anyway. Below is an approximate list: --- Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 779, Column: 2 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 968, Column: 133 Warning: assignment to undeclared variable viewsToolbarButton Source File: chrome://messenger/content/mailWindowOverlay.js Line: 170 Warning: assignment to undeclared variable linkNode Source File: chrome://communicator/content/contentAreaClick.js Line: 39 Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger/content/newmailalert.js Line: 117 Warning: variable emailAddress hides argument Source File: chrome://messenger/content/msgHdrViewOverlay.js Line: 899, Column: 6 Warning: variable displayName hides argument Source File: chrome://messenger/content/msgHdrViewOverlay.js Line: 409, Column: 10 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 114, Column: 4 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 912, Column: 100 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 919, Column: 133 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 968, Column: 133 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 972, Column: 2 Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 989 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/Feed.js Line: 119, Column: 13 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/Feed.js Line: 136, Column: 2 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/Feed.js Line: 402, Column: 2 Warning: assignment to undeclared variable i Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 436 Error: server has no properties Source File: chrome://messenger-newsblog/content/utils.js Warning: assignment to undeclared variable viewsToolbarButton Source File: chrome://messenger/content/mailWindowOverlay.js Line: 170 Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger/content/preferences/general.js Line: 179 Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger/content/preferences/connection.js Line: 147 Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger/content/preferences/display.js Line: 92 Warning: function onOKNewTag does not always return a value Source File: chrome://messenger/content/newTagDialog.js Line: 131 Warning: variable removeButton hides argument Source File: chrome://messenger/content/preferences/viewpasswords.js Line: 485, Column: 6 Warning: variable removeAllButton hides argument Source File: chrome://messenger/content/preferences/viewpasswords.js Line: 486, Column: 6 Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger/content/preferences/privacy.js Line: 134 Error: gOfflineDialog is not defined Source File: chrome://global/content/bindings/preferences.xml Line: 665 Warning: anonymous function does not always return a value Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 114, Column: 4 Warning: trailing comma is not legal in ECMA-262 object initializers Source File: chrome://messenger-newsblog/content/feed-subscriptions.js Line: 782, Column: 2 Warning: assignment to undeclared variable ispDirectory Source File: chrome://messenger/content/am-junk.js Line: 94 Error: fp.file has no properties Source File: chrome://messenger/content/amUtils.js Line: 81 Warning: Error in parsing value for property 'background-color'. Declaration dropped. Source File: chrome://messenger/content/preferences/preferences.xul Line: 0 Warning: function onOKEditTag does not always return a value Source File: chrome://messenger/content/newTagDialog.js Line: 112 Warning: function onOKNewTag does not always return a value Source File: chrome://messenger/content/newTagDialog.js Line: 131 Warning: Error in parsing value for property 'background-color'. Declaration dropped. Source File: chrome://messenger/content/newTagDialog.xul Line: 0
Attachment #258692 - Flags: superreview?(bienvenu)
Attachment #258692 - Flags: review?(bienvenu)
Comment on attachment 258692 [details] [diff] [review] proposed fix thx a lot, Magnus!
Attachment #258692 - Flags: superreview?(bienvenu)
Attachment #258692 - Flags: superreview+
Attachment #258692 - Flags: review?(bienvenu)
Attachment #258692 - Flags: review+
Whiteboard: [checkin needed]
mozilla/mail/base/content/contentAreaClick.js 1.13 mozilla/mail/base/content/mailWindowOverlay.js 1.163 mozilla/mail/base/content/newmailalert.js 1.16 mozilla/mail/components/preferences/compose.js 1.14 mozilla/mail/components/preferences/connection.js 1.6 mozilla/mail/components/preferences/display.js 1.9 mozilla/mail/components/preferences/general.js 1.16 mozilla/mail/components/preferences/offline.xul 1.4 mozilla/mail/components/preferences/privacy.js 1.16 mozilla/mail/components/preferences/sendoptions.js 1.3 mozilla/mail/components/preferences/viewpasswords.js 1.5 mozilla/mail/extensions/newsblog/content/feed-subscriptions.js 1.18 mozilla/mailnews/mailnews.js 3.293 mozilla/mailnews/base/prefs/resources/content/am-junk.js 1.10 mozilla/mailnews/base/prefs/resources/content/amUtils.js 1.6 mozilla/mailnews/base/resources/content/newTagDialog.js 1.5
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: