Array length does not handle defined properties correctly

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b115
    • generic
    • generic

      ES5 #15.4.5.2 says:

      "The length property of this Array object is a data property whose value is always numerically greater than the name of every deletable property whose name is an array index."

      This means that when setting length to a lower value, deletable array elements with ids higher or equal than new length must be deleted, while non-deletable elements must cause the new length to be one greater than the biggest non-deletable id.

      Both is currently not done for elements defined via Object.defineProperty with non-standard attributes (stored as generic property instead of in array data).

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: