Closed Bug 466990 Opened 16 years ago Closed 16 years ago

options() in js shell silently ignore unknown option names

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: igor, Assigned: igor)

Details

Attachments

(1 file)

Currently in js shell both -o option and the options() function ignore unknown option names. It would be nice if instead the shell would report an error message in such cases so misspelled names can be spotted immediately.
Attached patch fix v1Splinter Review
With the patch the following happens with bad options:

~/m/31-ff/js/src> ./dbg/js -o jir
unknown option name 'jir'. The valid names are anonfunfix, atline, jit, relimit, strict, werror and xml.
~/m/31-ff/js/src> ./dbg/js -e 'options("jjit")'
-e:1: Error: unknown option name 'jjit'. The valid names are anonfunfix, atline, jit, relimit, strict, werror and xml.
Attachment #350331 - Flags: review?(crowder)
Attachment #350331 - Flags: review?(crowder) → review+
landed - http://hg.mozilla.org/mozilla-central/rev/bf71001d6521
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
this caught a typo in js1_5/Regress/regress-322430.js, landed http://hg.mozilla.org/mozilla-central/rev/36e81ad3e5f3 and cvs.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Flags: in-litmus-
Flags: in-testsuite+ → in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: