Open Bug 1135997 Opened 10 years ago Updated 1 month ago

XrayWrapper<Base, Traits>::defineProperty: Use result.fail() to report certain errors.

Categories

(Core :: JavaScript Engine, defect, P3)

x86_64
Linux
defect

Tracking

()

People

(Reporter: jorendorff, Unassigned)

References

(Blocks 1 open bug)

Details

XrayWrapper::defineProperty is stricter than ordinary Object.defineProperty about what sort of redefinition is permitted. But it doesn't report failure in any way when the rules are broken; it just silently doesn't define anything. There's even a comment: // We should technically report non-configurability in strict mode, but // doing that via JSAPI is a lot of trouble. With bug 1113369, it's not much trouble anymore. (In fact it's trivial, but it should be tested somehow.)
Severity: normal → S3

(Actually making this change does worry me a bit; concerned about breaking existing web-extensions who may not realize the behaviour change.

On the other hand... perhaps it's better to throw than leave people wondering about their sanity)

Blocks: sm-xray
No longer blocks: es6internalmethods
Severity: S3 → S4
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.