Last Comment Bug 886949 - Add Number.parseInt and Number.parseFloat
: Add Number.parseInt and Number.parseFloat
Status: RESOLVED FIXED
[qa-]
: dev-doc-complete
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla25
Assigned To: Till Schneidereit [:till] (ECOOP July 18 - July 22, pto July 23 - July 31)
:
Mentors:
Depends on:
Blocks: es6
  Show dependency treegraph
 
Reported: 2013-06-25 12:46 PDT by Brandon Benvie [:benvie]
Modified: 2015-02-22 22:48 PST (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
Add Number.parseInt and Number.parseFloat (9.20 KB, patch)
2013-07-05 13:53 PDT, Till Schneidereit [:till] (ECOOP July 18 - July 22, pto July 23 - July 31)
jwalden+bmo: review+
Details | Diff | Splinter Review

Description Brandon Benvie [:benvie] 2013-06-25 12:46:45 PDT
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.
Comment 1 Till Schneidereit [:till] (ECOOP July 18 - July 22, pto July 23 - July 31) 2013-07-05 13:53:47 PDT
Created attachment 771686 [details] [diff] [review]
Add Number.parseInt and Number.parseFloat

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.
Comment 2 Till Schneidereit [:till] (ECOOP July 18 - July 22, pto July 23 - July 31) 2013-07-13 06:45:53 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/d520aeaf2e2c
Comment 3 Ed Morley [:emorley] 2013-07-15 02:57:08 PDT
https://hg.mozilla.org/mozilla-central/rev/d520aeaf2e2c
Comment 4 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2013-09-13 11:21:04 PDT
Assuming this does not need QA. Please remove the [qa-] whiteboard tag and add the verifyme keyword if QA is needed.

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