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

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Core
JavaScript Engine
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: brendan, Assigned: brendan)

Tracking

Trunk
mozilla1.9.2a1
Points:
---
Bug Flags:
wanted1.9.1.x ?

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
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
(Assignee)

Comment 1

8 years ago
Created attachment 387888 [details] [diff] [review]
fix
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #387888 - Flags: review?(sayrer)
(Assignee)

Updated

8 years ago
Flags: wanted1.9.1.x?

Updated

8 years ago
Attachment #387888 - Flags: review?(sayrer) → review+

Comment 2

8 years ago
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 ?
(Assignee)

Comment 3

8 years ago
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

Comment 4

8 years ago
http://hg.mozilla.org/mozilla-central/rev/216de166d504
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

8 years ago
Whiteboard: fixed-in-tracemonkey → fixed-in-tracemonkey, bake-time-5days

Updated

8 years ago
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.