Closed
Bug 584811
Opened 12 years ago
Closed 12 years ago
Date.prototype.toJSON isn't to spec
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
(Keywords: dev-doc-complete, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
11.03 KB,
patch
|
sayrer
:
review+
|
Details | Diff | Splinter Review |
Per ES5 it is not merely a clone of toISOString; it actually does something like the weirdness of Array.prototype.toString in that it does some checks, then delegates to |this.toISOString|.
Assignee | ||
Comment 1•12 years ago
|
||
(discovered via the MS ES5 tests, somewhat)
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #465528 -
Flags: review?(sayrer)
Comment 3•12 years ago
|
||
Comment on attachment 465528 [details] [diff] [review] Patch and tests Righteous. >+ >+ if (!Invoke(cx, args, 0)) >+ return false; >+ *vp = args.rval(); >+ return true; I think the style police want a blank line before and after the assignment to *vp.
Attachment #465528 -
Flags: review?(sayrer) → review+
Comment 4•12 years ago
|
||
(In reply to comment #3) > Comment on attachment 465528 [details] [diff] [review] > Patch and tests > > Righteous. > > >+ > >+ if (!Invoke(cx, args, 0)) > >+ return false; > >+ *vp = args.rval(); > >+ return true; > > I think the style police want a blank line before and after the assignment to > *vp. No -- who ever said so? Bad cop, no donut. /be
Updated•12 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 5•12 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/2573e884e17b I'm pretty sure I've seen both styles for the blank-line nit, or at least I have not seen one so often that it has consciously risen in my mind to the level of a gold standard. Killed the blank line here, tho.
Whiteboard: fixed-in-tracemonkey
Comment 6•12 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/2573e884e17b
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 7•12 years ago
|
||
Added: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toJSON Listed on: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/prototype And mentioned on: https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.8.5
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•