Issue 2328 in v8: arguments.callee.caller.arguments isn't bind to caller's arguments

10 views
Skip to first unread message

codesite...@google.com

unread,
Sep 9, 2012, 9:08:41 AM9/9/12
to v8-...@googlegroups.com
Status: New
Owner: ----

New issue 2328 by buschto...@gmail.com: 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

codesite...@google.com

unread,
Sep 10, 2012, 4:32:47 AM9/10/12
to v8-...@googlegroups.com
Updates:
Status: Duplicate
Mergedinto: 222

Comment #1 on issue 2328 by erik.corry: arguments.callee.caller.arguments
isn't bind to caller's arguments
http://code.google.com/p/v8/issues/detail?id=2328

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages