archives

« Bugzilla Issues Index

#2049 — 9.2.5: Add lower/upper bounds restriction to integer-indexed properties


The current definition of integer-indexed properties in 9.2.5 is a bit confusing/unusual, because it includes "Infinity", "-Infinity" and "9999999999999998", but not "9999999999999999".

Note: I mean the actual string values here, so `typedArray["9999999999999999"]` and not `typedArray[9999999999999999]` where `typedArray` is a TypedArray instance.


Maybe change it to state that `Number.MIN_SAFE_INTEGER ≤ ToInteger(P) ≤ Number.MAX_SAFE_INTEGER` must hold. Or specify that integer-indexed properties must be elements of the language defined by `(-|ε)(0|[1-9][0-9]*)`.


yes, and value greater than MAX_SAFE_INTEGER should be treated as out of range indies rather than reverting to default property handling.


This issue now also applies the definition for integer index in 6.1.7 The Object Type.


added MAX_SAFE_INTEGER range limit to definition in 6.1.7. Definition no longer appears in 9.4.5 and the various usage sites seems to already correctly limit such values to the actual length of the objects being accessed.


Fixed in Rev26