archives

« Bugzilla Issues Index

#2066 — 22.1.3.22 Array.prototype.slice(): Change CreateOwnDataProperty() to DefinePropertyOrThrow()


22.1.3.22 Array.prototype.slice (start, end), steps 18.d.iii - 18.d.v:

The common pattern for this operation is to use DefinePropertyOrThrow() instead of using CreateOwnDataProperty(). Do you mind changing this?

From:
> iii. Let status be the result of CreateOwnDataProperty(A, ToString(n), kValue).
> iv. ReturnIfAbrupt(status).
> v. If status is false, throw a TypeError exception.

To:
> iii. Let status be the result of DefinePropertyOrThrow(A, ToString(n), Property Descriptor {[[Value]]: kValue, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}).
> iv. ReturnIfAbrupt(status).


fixed in rev20 editor's draft

added a CreateDataPropertyOrThrow abstraction operation to handle situations like this


fixed in rev20 draft, Oct. 28, 2013