Implement toJSON for primitive wrapper classes

RESOLVED FIXED in mozilla1.9.1b2

Status

()

Core
JavaScript Engine
P1
normal
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Robert Sayre, Assigned: Robert Sayre)

Tracking

unspecified
mozilla1.9.1b2
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

9 years ago
Pretty straightforward, also requires Date.toISOString() from ES3.1
(Assignee)

Updated

9 years ago
Assignee: general → sayrer
(Assignee)

Comment 1

9 years ago
Created attachment 343445 [details] [diff] [review]
toJSON + toISOString + tests
(Assignee)

Comment 2

9 years ago
Created attachment 343446 [details] [diff] [review]
toJSON + toISOString + tests
Attachment #343446 - Flags: review?(brendan)
(Assignee)

Updated

9 years ago
Priority: -- → P1
Target Milestone: --- → mozilla1.9.1b2
(Assignee)

Updated

9 years ago
Attachment #343445 - Attachment is obsolete: true
Comment on attachment 343446 [details] [diff] [review]
toJSON + toISOString + tests

Brian, can you field this one? I've got an overflowing queue of stuff to do. Thanks.

>+    return date_utc_format(cx, vp, &print_gmt_string);
...
>+    return date_utc_format(cx, vp, &print_iso_string);

Nit: no unary-& needed in C/C++, or used according to house style, for function pointers.

/be
Attachment #343446 - Flags: review?(brendan) → review?(crowder)

Comment 4

9 years ago
Comment on attachment 343446 [details] [diff] [review]
toJSON + toISOString + tests

Is there opposition to growing the PRMJTime year member?  Otherwise, and other than Brendan's nit, this looks good to me.

Updated

9 years ago
Attachment #343446 - Flags: review?(crowder) → review+
(Assignee)

Comment 5

9 years ago
In a beta cycle, PRMJTime seems like a pretty high risk place to touch for little benefit.

http://hg.mozilla.org/mozilla-central/rev/8000213aaa7f
(Assignee)

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Comment 6

9 years ago
covered under unittests:
dom/src/json/test/json2.js, dom/src/json/test/unit/test_encode.js
Flags: in-testsuite+
Flags: in-litmus-

Updated

9 years ago
Depends on: 469627
You need to log in before you can comment on or make changes to this bug.