Closed
Bug 102093
Opened 23 years ago
Closed 22 years ago
parameter named "arguments" is not accessible in JavaScript method
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.5R5
People
(Reporter: pschwartau, Assigned: norrisboyd)
Details
Attachments
(2 files)
5.88 KB,
patch
|
Details | Diff | Splinter Review | |
691 bytes,
patch
|
Details | Diff | Splinter Review |
This is the Rhino version of bug 94506 in SpiderMonkey, reported by
deneen@alum.bucknell.edu:
The following code does not do what is expected:
function f(arguments)
{
return arguments;
}
f(5);
Actual Results: [object Arguments]
Expected Results: 5
There is a testcase for this in the JS testsuite:
mozilla/js/tests/ecma_3/Function/regress-94506.js
See bug 94506 for considerable discussion -
Comment 1•22 years ago
|
||
The patch adds to NativeCall constructor checks to ensure that arguments object
is only initialized if there is no function parameter with the same name.
I also split NativeCall that inherited from IdScriptable into NativeCall that
extends ScriptableObject and NativeCallPrototype that extends to make instances
of NativeCall smaller and to allow for faster property access since get/put/has
would not go throw an additional indirection level in IdScriptable.
Comment 2•22 years ago
|
||
I committed the fix
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 3•22 years ago
|
||
Due to the bug fix Rhino passing now ecma_3/Function/regress-94506.js so there
is no point to skip it.
Phil, could you apply this?
You need to log in
before you can comment on or make changes to this bug.
Description
•