Closed Bug 1133315 Opened 10 years ago Closed 10 years ago

Shapes should never have JSPROP_GETTER without JSPROP_SETTER or vice versa

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1138499

People

(Reporter: jorendorff, Unassigned)

References

Details

ES6 says these two objects behave the same: Object.defineProperty({}, "prop", {get: function(){}})) Object.defineProperty({}, "prop", {get: function(){}, set: undefined})) In SM these calls produce properties with different attributes: the latter has JSPROP_SETTER but the former does not. Having two different ways internally to express exactly the same property sounds sketchy to me. What's the point of having a bit that doesn't affect the behavior? Shapes, like complete property descriptors, should never have either JSPROP_GETTER or JSPROP_SETTER without the other. We should enforce this with assertions, and drop the Shape::hasGetterValue()/hasSetterValue() methods in favor of Shape::isAccessorDescriptor().
Duping forward to the bug where i'm actually going to patch this at last.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.