Closed Bug 117023 Opened 23 years ago Closed 23 years ago

Javascript strict warnings in SignonViewer.js

Categories

(Toolkit :: Form Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: matt, Unassigned)

Details

Attachments

(1 file)

CVS debug build pulled at 5:50 PM December 26, PST.

When bring up the "View Stored Passwords" dialog, the following Javascript
strict warnings are generated:

WARNING: waaah!, file nsXULPrototypeDocument.cpp, line 661
JavaScript strict warning: 
chrome://communicator/content/wallet/SignonViewer.js line 146: trailing comma is
not legal in ECMA-262 object initializers

WARNING: waaah!, file nsXULPrototypeDocument.cpp, line 661
JavaScript strict warning: 
chrome://communicator/content/wallet/SignonViewer.js line 262: trailing comma is
not legal in ECMA-262 object initializers


The first error is for the initializer of variable
signonsOutlinerView, and the second is for the initializer of varible
rejectsOutlinerView.
Attached patch fix js errorsSplinter Review
cc'ing alecf and sgehani for reviews
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.8
And I got:
Error: document.getElementById("removeAllRejects") has no properties
Source File: chrome://communicator/content/wallet/SignonViewer.js
Line: 286

at the same moment.
Comment #3 is not related to this bug report.  If there is a problem, then 
please report it in a separate report.

This report covers the js errors due to trailing comma at the end of a list.  It 
indeed occurs in the two places reported in this report, as well as two other 
places in signonviewer.js and also in two places in cookieviewer.js.  Those are 
all fixed by the attached patch.

I don't mean to be picuyune in requiring a separate report for comment #3, but 
there are good reasons for doing so.  First off, the comment might be invalid in 
which case it would confuse things as to how to close out this report (invalid?, 
fixed?).  Second, it's not at all obvious why that error should be occuring if 
it indeed occurs, so I don't have a quick fix for it and I don't want to have 
that block checking in the obvious fixes for the problems that are covered by 
this report.
Comment on attachment 62810 [details] [diff] [review]
fix js errors

r=sgehani
Attachment #62810 - Flags: review+
Keywords: nsbeta1
Comment on attachment 62810 [details] [diff] [review]
fix js errors

sr=alecf
Attachment #62810 - Flags: superreview+
Patch checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Zbigniew Braniecki: I didn't forget about your comment #3 above.  I just tested 
it and opened bug 117998 on that bug.  It's more than just a js warning as 
described in the new bug report.
Huh. Thanks :)
Next time I'll report it myself :)
verified fixed in 20020115
Status: RESOLVED → VERIFIED
Assignee: morse → nobody
Product: Core → Toolkit
QA Contact: tpreston → form.manager
Target Milestone: mozilla0.9.8 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: