Closed Bug 245148 Opened 21 years ago Closed 21 years ago

[null].toSource() == [].toSource() : null in array is blank

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.8alpha2

People

(Reporter: bebabo, Assigned: brendan)

Details

(Keywords: fixed1.7, js1.5, Whiteboard: fixed-aviary1.0)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 Array.toSource() represents null as 'blank' (instead of expected 'null'). This in all versions of Firefox / Mozilla i had at hand. Reproducible: Always Steps to Reproduce: 1. lauch javascript console 2. type [null].toSource() in command line Actual Results: prints: [] Expected Results: should print: [null]
OS: Windows 2000 → All
Patch in a trice. /be
Assignee: general → brendan
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: js1.5
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.8alpha1
Attached patch proposed fixSplinter Review
Easy, got rid of a useless assignment too. /be
Fixed on trunk. Going for 1.7 approval. /be
Status: NEW → RESOLVED
Closed: 21 years ago
Flags: blocking1.7+
Resolution: --- → FIXED
Target Milestone: mozilla1.8alpha1 → mozilla1.8alpha2
Attachment #149862 - Flags: approval1.7?
Attachment #149862 - Flags: approval1.7? → approval1.7+
Fixed on the 1.7 branch too. /be
Fixed for 1.7 too. /be
Keywords: fixed1.7
Whiteboard: needed-aviary1.0
Whiteboard: needed-aviary1.0 → fixed-aviary1.0
Thomas, with your permission this will be included in the javascript test suite.
No reply, but since this case is so trivial, I have checked in js/tests/js1_5/Regress/regress-245148.js anyway.
Flags: testcase+
verified fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: