Hello,
I noticed that the java array backing the "arguments" variable is reused
in Array iterative methods. For example:
var f = function() { return arguments };
var a = [1, 2].map(f);
a[0][0] === a[1][0]
returns true. (Spidermonkey returns false.)
There's an easy fix: in NativeArray.iterativeMethod move
Object[] innerArgs = new Object[3];
inside the for loop.
(I ran into this issue while calling asynchronous functions e.g.
msgs.forEach(process))... which ended processing n times the same data!)
BTW I have a problem with destructuring assignment
(https://bugzilla.mozilla.org/show_bug.cgi?id=404484) and another with
__iterator__ in compiled mode
(https://bugzilla.mozilla.org/show_bug.cgi?id=402331) which are beyond
my current understanding of the Rhino codebase.
Christophe
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino