Closed Bug 798299 Opened 13 years ago Closed 11 years ago

keys trap invariant not enforced

Categories

(Core :: JavaScript Engine, defect)

18 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1049662

People

(Reporter: bruant.d, Unassigned)

References

()

Details

From the wiki: "Check whether all enumerable sealed target properties are listed in the trap result" However, this test fails: var t = {a:1}; Object.defineProperty(t, 'b', {value: 2, configurable: false, enumerable: false}); Object.defineProperty(t, 'c', {value: 3, configurable: false, enumerable: true}); var p = new Proxy(t, { getOwnPropertyNames: function(target){ return ['a', 'b']; // forgetting 'c'. Oops... } }); Object.keys(p); // ? The last call should throw because of 'c' omission, but it doesn't currently in nightly.
The invariant is also not enforced for the enumerate trap (but that might be related to bug 783826 ). Make sure the same invariant holds for the enumerate trap when fixing this.
Assignee: general → nobody
Not a direct dup, but in spirit.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.