-
Notifications
You must be signed in to change notification settings - Fork 913
Closed
Labels
Ecma IncompatibilityIssues about Rhino being incompatible with the EcmaScript specIssues about Rhino being incompatible with the EcmaScript specbugIssues considered a bugIssues considered a bug
Description
Description
Build version: 1.7.14
OS version: ubuntu20.04
The following code showed that rhino didn't change the length of array and even didn't trigger the get() method in defineProperty, while other js engines(like V8 in Google,Spidermokey in firefox) did.
Testcase
var array = new Array(5)
var proto = {};
Object.setPrototypeOf(array,proto);
Object.defineProperty(
proto, 1, {
get() {
array.length = 1;
return 1;
},
});
var a=[];
var res=a.concat(array);
print(array.length);
Output
5
Expected behavior
1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Ecma IncompatibilityIssues about Rhino being incompatible with the EcmaScript specIssues about Rhino being incompatible with the EcmaScript specbugIssues considered a bugIssues considered a bug