[Webkit-unassigned] [Bug 221177] A possible bug about Array.prototype.push

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 30 12:17:46 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221177

--- Comment #1 from Yusuke Suzuki <ysuzuki at apple.com> ---
setLength should throw an error even if it is setting the same length if length is readonly.
This bug does not break the invariant of freezing (error will not happen only when the setting length equals to the existing length.) But it is strictly speaking not aligned to the spec.

var a=[1,2];
Object.freeze(a); 
a.push(2); // Throwing an error correctly since it is pushing a value and changing length actually.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210130/e2cbd771/attachment.htm>


More information about the webkit-unassigned mailing list