ECMA Conformance bug: Object.prototype.toLocaleString() undefined

VERIFIED FIXED

Status

()

Core
JavaScript Engine
P3
normal
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: David Flanagan, Assigned: rogerl (gone))

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
js 1.5 rc1 does not conform to ECMA V3 15.2.4.3: it does not 
define Object.prototype.toLocaleString()

Comment 1

18 years ago
Compare bug 44623, bug 44624 

Comment 2

18 years ago
Here is the section from the ECMA3 document:


15.2.4.3 Object.prototype.toLocaleString ( )

This function returns the result of calling toString().

NOTE This function is provided to give all Objects a generic toLocaleString
interface, even though not all may use it.

Currently, Array, Number, and Date provide their own locale-sensitive
toLocaleString methods.

NOTE The first parameter to this function is likely to be used in a future
version of this standard; it is recommended that implementations do not use
this parameter position for anything else.

Comment 3

18 years ago
It looks like this was fixed as of Release Candidate 2 (2000-08-11).
See:

                ftp://ftp.mozilla.org/pub/js/js-1.5-rc2.tar.gz

(Or check Mozilla mirror sites at 

                http://www.mozilla.org/mirrors.html
)

Using Release Candidate 2, and the current trunk of JS, I got this:


                js> var o = new Object()

                js> o.toString()
                [object Object]

                js> o.toLocaleString()
                [object Object]

                js> o.__proto__.toLocaleString()
                [object Object]

                js> Object.prototype.toLocaleString()
                [object Object]



A check of the CVS log for jsobj.c shows the change was checked in 
on 2000-08-09. See rev 3.55 at:  

       http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/js/src/jsobj.c
Status: UNCONFIRMED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 4

18 years ago
Marking Verified -
Status: RESOLVED → VERIFIED
(Reporter)

Comment 5

18 years ago
Actually, the js-1.5-rc2 tarball on ftp.mozilla.org does not have
this fix in it.  In fact, that tarball still reports itself as "pre-release 1".
I've downloaded it twice to verify.  The version of jsobj.c in the tarball is
dated July 21st, so it doesn't include the patch described.

Comment 6

18 years ago
Thank you - I'll see about re-doing the tarball. For Release Candidate 2,
what I'm using is a direct CVS pull on this branch:

                             -r JS_150_RC2
You need to log in before you can comment on or make changes to this bug.