Closed Bug 884516 Opened 11 years ago Closed 11 years ago

Remove JS shell global 'arguments' variable

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jorendorff, Unassigned)

References

Details

Attachments

(1 file)

How about we reverse the patch in bug 675269? The fact that 'arguments' is an array in tests is (empirically) surprising and confusing.
Yes, please. I remember I was quite confused by the presence of a global 'arguments' binding.
Attached patch v1 (deleted) — Splinter Review
Attachment #764436 - Flags: review?(luke)
Comment on attachment 764436 [details] [diff] [review] v1 Review of attachment 764436 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/shell/js.cpp @@ +5254,5 @@ > || !op.addBoolOption('O', "print-alloc", "Print the number of allocations at exit") > #endif > || !op.addOptionalStringArg("script", "A script to execute (after all options)") > || !op.addOptionalMultiStringArg("scriptArgs", > + "String arguments to bind as |stringArgs| in the " s/stringArgs/scriptArgs/
Attachment #764436 - Flags: review?(luke) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
I got a report from IRC: <{V}> ... incidentally, arguments.length still reports as 1, but argements[0] is undefined Could it be that arguments.length is still working, although arguments is removed? Didn't test or looked into myself...
Nvm previous comment. Is a bogus claim ;)
Depends on: 917504
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: