Summary: | Object.freeze() and seal() should throw if [[PreventExtensions]]() fails. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||||
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | fpizlo, ggaren, jfbastien, keith_miller, msaboff, saam, ysuzuki | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Local Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Mark Lam
2016-10-07 17:24:52 PDT
Created attachment 290987 [details]
repro test case.
Created attachment 290994 [details]
proposed patch.
Comment on attachment 290994 [details]
proposed patch.
Bad patch. That's what I get for making last minute changes.
Created attachment 290996 [details]
proposed patch.
Comment on attachment 290996 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=290996&action=review r=me > Source/JavaScriptCore/runtime/ObjectConstructor.cpp:480 > +template<IntegrityLevel level> > +bool setIntegrityLevel(ExecState* exec, VM& vm, JSObject* object) Maybe it's worth including a link to the spec here. > Source/JavaScriptCore/runtime/ObjectConstructor.cpp:496 > + if (exec->propertyNames().isPrivateName(propertyName)) You should use vm to get the PropertyNames. Thanks for the review. I've made the suggested changes. Landed in r206948: <http://trac.webkit.org/r206948>. |