Closed Bug 886949 Opened 11 years ago Closed 11 years ago

Add Number.parseInt and Number.parseFloat

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25
Tracking Status
relnote-firefox --- -

People

(Reporter: bbenvie, Assigned: till)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [qa-])

Attachments

(1 file)

In ES6, `Number.parseInt` and `Number.parseFloat` have been added, and are the same as the global functions of the same names (purpose is modularization of globals).

See ES6 spec (May 2013 revision) sections 15.7.3.9 and 15.7.3.10.
This is all very straight-forward.

As these are meant to behave identical to their global function counterparts, I just added them to number_static_methods.

In case they ever deviate from the global functions in any way, the duplicated tests should catch any errors that might otherwise sneak in.
Attachment #771686 - Flags: review?(jwalden+bmo)
Assignee: general → till
Attachment #771686 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/d520aeaf2e2c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Assuming this does not need QA. Please remove the [qa-] whiteboard tag and add the verifyme keyword if QA is needed.
Whiteboard: [qa-]
See Also: → 1135560
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: