Closed
Bug 1216640
Opened 10 years ago
Closed 9 years ago
Incorrect operation order in Object.create, Object.defineProperties
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
DUPLICATE
of bug 928083
Tracking | Status | |
---|---|---|
firefox44 | --- | affected |
People
(Reporter: anba, Unassigned)
References
(Blocks 1 open bug)
Details
Test case for Object.create:
---
Object.create(null, {
__proto__: {
get q() {
print("get q called");
return {value: 2, writable: true, enumerable: true, configurable: true};
}
},
get p() {
delete this.q;
return {value: 1, writable: true, enumerable: true, configurable: true};
},
q: null
});
---
Test case for Object.defineProperties:
---
Object.defineProperties({}, {
__proto__: {
get q() {
print("get q called");
return {value: 2, writable: true, enumerable: true, configurable: true};
}
},
get p() {
delete this.q;
return {value: 1, writable: true, enumerable: true, configurable: true};
},
q: null
});
---
Expected: "get q called" is not printed
Actual: "get q called" is printed
This is a ES2015 [1] change, the current SM implementation still follows ES5.1.
[1] https://bugs.ecmascript.org/show_bug.cgi?id=2053
Reporter | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•