[Webkit-unassigned] [Bug 163302] New: Array.prototype.concat should not modify frozen objects
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 11 15:26:58 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=163302
Bug ID: 163302
Summary: Array.prototype.concat should not modify frozen
objects
Classification: Unclassified
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mark.lam at apple.com
The ES6 spec for Array.prototype.concat states that it uses the CreateDataPropertyOrThrow() to add items to the result array. The spec for CreateDataPropertyOrThrow states:
"This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator. Normally, the property will not already exist. If it does exist and is not configurable or if O is not extensible, [[DefineOwnProperty]] will return false causing this operation to throw a TypeError exception."
Since the properties of frozen objects are not extensible nor configurable, Array.prototype.concat should fail to write to the result array if it is frozen.
Ref: https://tc39.github.io/ecma262/#sec-array.prototype.concat, https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow, and https://tc39.github.io/ecma262/#sec-createdataproperty.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161011/5dd006bf/attachment.html>
More information about the webkit-unassigned
mailing list