javascript strict warnings in EditorSaveAsCharset.js

VERIFIED FIXED in mozilla0.9.4

Status

()

Core
Editor
P3
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Henrik Gemal, Assigned: jbetak@netscape.com (away - not reading bugmail))

Tracking

Trunk
mozilla0.9.4
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed on the trunk)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
Warning: assignment to undeclared variable dialog
Source File: chrome://editor/content/EditorSaveAsCharset.js
Line: 46

Warning: reference to undefined property charsetList.sort
Source File: chrome://editor/content/EditorSaveAsCharset.js
Line: 121

Warning: assignment to undeclared variable i
Source File: chrome://editor/content/EditorSaveAsCharset.js
Line: 130

Warning: assignment to undeclared variable atom
Source File: chrome://editor/content/EditorSaveAsCharset.js
Line: 132

Warning: assignment to undeclared variable str
Source File: chrome://editor/content/EditorSaveAsCharset.js
Line: 136

Warning: assignment to undeclared variable tit
Source File: chrome://editor/content/EditorSaveAsCharset.js
Line: 138

Warning: assignment to undeclared variable visible
Source File: chrome://editor/content/EditorSaveAsCharset.js
Line: 144

Please add the following line to your prefs.js file, so we could avoid all the
strict warning fixup...:
user_pref("javascript.options.strict", true);
(Reporter)

Updated

17 years ago
Summary: javascript strict warnings in → javascript strict warnings in EditorSaveAsCharset.js

Comment 1

17 years ago
cmanske
Assignee: beppe → cmanske
Priority: -- → P3
Target Milestone: --- → mozilla0.9.3

Comment 2

17 years ago
one line fix, removal of js error

reviewed and approved
Keywords: nsBranch

Comment 3

17 years ago
removing nsBranch and pushing out to 1.0
Keywords: nsBranch
Target Milestone: mozilla0.9.3 → mozilla1.0

Comment 4

17 years ago
changing milestone to 0.9.4
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0 → mozilla0.9.4
Created attachment 44076 [details] [diff] [review]
fix for all strict JS warnings in EditorSaveAsCharset.js
adding myself and ftang to the cc list... cmanske, if you agree, I can take 
this bug.

Comment 7

17 years ago
Sure, you can have it! Looks good to me.
r=cmanske
Assignee: cmanske → jbetak
Status: ASSIGNED → NEW
thanks! cc'ing blake and ben for sr.
cc'ing blizzard for i18n sr
Whiteboard: have fix, need sr
did you mean to remove that charset.sort?

sr=blizzard
Chris,

thanks for reviewing this! Good catch BTW. It's been a while since I wrote this
and your comment put me into a state of frantic shuffling. I seem to remember
now - the sort had to be removed, because for some reason charsetList is not an
array and we can't perform the sort there. The charset dictionary will be sorted
some 20 lines further below, so we should be be OK.

Incidentally, the JS sort is not locale-aware and there is a Bugscape bug
against the Netscape 6.1 RTM build on that. Japanese charset list has a handful
of mis-sorted items and I have a patch rolled up to address that by reading the
charset list from a pre-sorted RDF source, which also mean that thankfully this
piece of code will be going soon.

http://lxr.mozilla.org/seamonkey/source/editor/ui/dialogs/content/EditorSaveAsCharset.js#154
Status: NEW → ASSIGNED
Whiteboard: have fix, need sr → ready to land, waiting for the tree on open
fix checked in - thanks everyone!
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Whiteboard: ready to land, waiting for the tree on open → fixed on the trunk
(Reporter)

Comment 13

17 years ago
Verified! Warnings seems gone to me. Will reopen if found again...
Build 20010820 on win2k
Status: RESOLVED → VERIFIED
thanks Gemal!
You need to log in before you can comment on or make changes to this bug.