Closed Bug 503524 Opened 16 years ago Closed 16 years ago

JSON.stringify does not condition number-typed space parameter per spec

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: brendan, Assigned: brendan)

Details

(Whiteboard: fixed-in-tracemonkey, bake-time-5days:7/18)

Attachments

(1 file)

ES5 draft in 15.12.3 stringify ( value [ , replacer [ , space ] ] ) says 4.6. If Type(space) is number a. Let space be min(10, ToInteger(space))the lesser of space and 100. b. Set gap to a string containing space space characters. This will be the empty string if space is less than 1. /be
Attached patch fixSplinter Review
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #387888 - Flags: review?(sayrer)
Flags: wanted1.9.1.x?
Attachment #387888 - Flags: review?(sayrer) → review+
there are a bunch of little issues like this, since the spec changed pretty late (IE8 has issues too). Should we try to get them on 1.9.1.1 ?
http://hg.mozilla.org/tracemonkey/rev/216de166d504 I'm in favor of fixing this ASAP. It's a safe fix. ES5 benefits from being tested as currently drafted, and we don't expect changes here. /be
Whiteboard: fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-tracemonkey → fixed-in-tracemonkey, bake-time-5days
Whiteboard: fixed-in-tracemonkey, bake-time-5days → fixed-in-tracemonkey, bake-time-5days:7/18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: