Bug 143657 - Number.parseInt in nightly r182673 has wrong length
Summary: Number.parseInt in nightly r182673 has wrong length
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jordan Harband
URL:
Keywords:
Depends on:
Blocks: 143799
  Show dependency treegraph
 
Reported: 2015-04-12 23:02 PDT by Jordan Harband
Modified: 2015-04-15 15:10 PDT (History)
1 user (show)

See Also:


Attachments
Patch (90.31 KB, patch)
2015-04-15 13:29 PDT, Jordan Harband
no flags Details | Formatted Diff | Diff
Patch (4.91 KB, patch)
2015-04-15 13:41 PDT, Jordan Harband
no flags Details | Formatted Diff | Diff
Patch (4.76 KB, patch)
2015-04-15 13:50 PDT, Jordan Harband
no flags Details | Formatted Diff | Diff
Patch for landing (4.36 KB, patch)
2015-04-15 13:54 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Harband 2015-04-12 23:02:29 PDT
Number.parseInt takes 2 arguments, and as such, should have a length of 2. In r182673, it has a length of 1. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.parseint

In addition, `Number.parseInt === parseInt` should return true, and does not. Note that `parseInt` has a proper length of 2.
Comment 1 Jordan Harband 2015-04-15 13:29:22 PDT
Created attachment 250846 [details]
Patch
Comment 2 Jordan Harband 2015-04-15 13:41:22 PDT
Created attachment 250850 [details]
Patch
Comment 3 Benjamin Poulain 2015-04-15 13:46:13 PDT
Comment on attachment 250850 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=250850&action=review

> Source/JavaScriptCore/ChangeLog:8
> +

Usually that is where you describe the change. The link to the spec would go here too.

> LayoutTests/ChangeLog:4
> +        https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.parseint

No need to repeat that. The information in each changelog explain the change for that particular subdirectory.

> LayoutTests/js/script-tests/number-constructor.js:134
> +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.parseint
> +shouldBe('Number.parseInt.length', '2'); // ES6 spec requires length matching number of required args

No need for the comments. It is clearly a dumb bug.
Comment 4 Jordan Harband 2015-04-15 13:50:56 PDT
Created attachment 250851 [details]
Patch
Comment 5 Benjamin Poulain 2015-04-15 13:52:22 PDT
Comment on attachment 250851 [details]
Patch

I'll land myself.
Comment 6 Benjamin Poulain 2015-04-15 13:54:58 PDT
Created attachment 250853 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2015-04-15 14:50:27 PDT
Comment on attachment 250853 [details]
Patch for landing

Clearing flags on attachment: 250853

Committed r182863: <http://trac.webkit.org/changeset/182863>
Comment 8 WebKit Commit Bot 2015-04-15 14:50:32 PDT
All reviewed patches have been landed.  Closing bug.