push() on frozen array increases its length property

XMLWordPrintable

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

        x = [1, 2, 3]; Object.freeze(x); x.push(4);
        <shell>:1 TypeError: Cannot set property "3" of frozen array
        jjs> x
        1,2,3,0
        jjs> x.length
        4

        x.length should still be 3.

              Assignee:
              Marcus Lagergren
              Reporter:
              Hannes Wallnoefer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: