Status: New
Owner: ----
New issue 2328 by [email protected]: arguments.callee.caller.arguments
isn't bind to caller's arguments
http://code.google.com/p/v8/issues/detail?id=2328
Consider the following:
function change(args) {
console.log(args[0]); // returns "Doesn't work..."
args[0] = "It works!";
console.log(args[0]); // returns "It works!"
}
function test(a) {
change(arguments);
console.log(a); // returns "It works!"
}
test("Doesn't work...");
This works, the directly passed arguments object is linked to the
function's arguments. But accessing it via callee.caller doesn't work, as
shown here.
function change() {
console.log(arguments.calle.caller.arguments[0]); // returns "Doesn't
work..."
arguments.calle.caller.arguments[0] = "It works!";
console.log(arguments.calle.caller.arguments[0]); // returns "It works!"
}
function test(a) {
change();
console.log(a); // returns "Doesn't work..."
}
test("Doesn't work...");
I'm pretty sure that this behaviour isn't intended and the magic link
should work with arguments.calle.caller.arguments as well.
Thanks for your time,
Jan Buschtöns
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev