Closed Bug 300001 Opened 19 years ago Closed 19 years ago

JS errors and strict warnings in dialog "Download actions"

Categories

(Firefox :: Settings UI, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox1.5

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

The dialog for viewing and editing download actions within the preferences has
several js errors and warnings. It's really simple to replicate.

1. Open the dialog
2. Enter a search term
3. Double click somewhere inside the tree.

Because a non-existing entry is selected, following errors and warnings are shown:

Warning: reference to undefined property this.activeCollection[aIndex]
Source File: chrome://browser/content/preferences/downloadactions.js
Line: 365

Warning: trailing comma is not legal in ECMA-262 object initializers
Source File: chrome://browser/content/preferences/changeaction.js
Line: 219
Source Code:
};

Error: this._item has no properties
Source File: chrome://browser/content/preferences/changeaction.js
Line: 13

Error: item has no properties
Source File: chrome://browser/content/preferences/downloadactions.js
Line: 589


Hitting "Clear" after that, this strict warning appears:

Warning: assignment to undeclared variable i
Source File: chrome://browser/content/preferences/downloadactions.js
Line: 717
Since bug 300074 is fixed only one strict warning is left:

Warning: assignment to undeclared variable i
Source File: chrome://browser/content/preferences/downloadactions.js
Line: 720

A patch will follow immediately.
Status: NEW → ASSIGNED
Depends on: 300074
Ok, two more warnings were left. This patch fixes them all.
Assignee: nobody → hskupin
Attachment #189214 - Flags: review?(benjamin)
Attachment #189214 - Flags: review?(benjamin) → review+
Attachment #189214 - Flags: approval1.8b4?
Attachment #189214 - Flags: approval1.8b4? → approval1.8b4+
Whiteboard: [checkin needed]
Whiteboard: [checkin needed] → [checkin needed][a+]
Checking in changeaction.js;
/cvsroot/mozilla/browser/components/preferences/changeaction.js,v  <-- 
changeaction.js
new revision: 1.3; previous revision: 1.2
done
Checking in downloadactions.js;
/cvsroot/mozilla/browser/components/preferences/downloadactions.js,v  <-- 
downloadactions.js
new revision: 1.5; previous revision: 1.4
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed][a+]
Status: RESOLVED → VERIFIED
Target Milestone: --- → Firefox1.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: