RESOLVED FIXED 220712
Object.assign should throw for property creation on non-extensible `target`
https://bugs.webkit.org/show_bug.cgi?id=220712
Summary Object.assign should throw for property creation on non-extensible `target`
Alexey Shvayka
Reported 2021-01-18 09:31:28 PST
Object.assign should always throw if `target` is non-extensible
Attachments
Patch (3.29 KB, patch)
2021-01-18 09:34 PST, Alexey Shvayka
ross.kirsling: review+
Alexey Shvayka
Comment 1 2021-01-18 09:34:53 PST
Ross Kirsling
Comment 2 2021-01-18 13:50:37 PST
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?
Radar WebKit Bug Importer
Comment 3 2021-01-21 18:10:29 PST
Alexey Shvayka
Comment 4 2021-02-05 06:26:48 PST
Alexey Shvayka
Comment 5 2021-02-05 06:27:32 PST
(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.
Note You need to log in before you can comment on or make changes to this bug.