Summary: | Object.assign should throw for property creation on non-extensible `target` | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Shvayka <ashvayka> | ||||
Component: | JavaScriptCore | Assignee: | Alexey Shvayka <ashvayka> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Trivial | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Alexey Shvayka
2021-01-18 09:31:28 PST
Created attachment 417838 [details]
Patch
Comment on attachment 417838 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417838&action=review r=me with comments > Source/JavaScriptCore/ChangeLog:3 > + Object.assign should always throw if `target` is non-extensible Seems like "always" is a bit too strong if we don't throw when updating a property, right? > Source/JavaScriptCore/ChangeLog:12 > + Aligns JSC with the spec [1], V8, and SpiderMonkey. Should we add a test262 test too? Committed r272411: <https://trac.webkit.org/changeset/272411> (In reply to Ross Kirsling from comment #2) Thank you for review, Ross! > Seems like "always" is a bit too strong if we don't throw when updating a > property, right? Absolutely, I've renamed the bug. > Should we add a test262 test too? Extensive tests are coming in https://github.com/tc39/test262/pull/2945. |