Closed Bug 285291 Opened 20 years ago Closed 20 years ago

array.length property is broken when using non-integer keys

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 252007

People

(Reporter: mytto, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1

More generally, when you use a associative array, length property becomes invalid.
It looks like length is computed as bigger integer index + 1 if existing, 0
otherwise.

Reproducible: Always

Steps to Reproduce:
View example


Actual Results:  
View example
See Js code for further information
Assignee: firefox → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → pschwartau
Version: unspecified → Trunk

*** This bug has been marked as a duplicate of 252007 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: