{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/100207392","pull_request_review_id":20907053,"id":100207392,"diff_hunk":"@@ -585,19 +585,23 @@ namespace Js\n         {\n             //use the first arg as the fraction digits, ignore the rest.\n             Var aFractionDigits = args[1];\n+            bool noRangeCheck = false;\n \n             // shortcut for tagged int's\n             if(TaggedInt::Is(aFractionDigits))\n             {\n                 fractionDigits = TaggedInt::ToInt32(aFractionDigits);\n             }\n             else if(JavascriptOperators::GetTypeId(aFractionDigits) == TypeIds_Undefined)\n-                ; // fraction digits = -1\n+            {","path":"lib/Runtime/Library/JavascriptNumber.cpp","position":13,"original_position":13,"commit_id":"33f3ad269335dbafc7962733dfad1958eff56f0b","original_commit_id":"33f3ad269335dbafc7962733dfad1958eff56f0b","user":{"login":"ThomsonTan","id":1041795,"avatar_url":"https://avatars.githubusercontent.com/u/1041795?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomsonTan","html_url":"https://github.com/ThomsonTan","followers_url":"https://api.github.com/users/ThomsonTan/followers","following_url":"https://api.github.com/users/ThomsonTan/following{/other_user}","gists_url":"https://api.github.com/users/ThomsonTan/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomsonTan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomsonTan/subscriptions","organizations_url":"https://api.github.com/users/ThomsonTan/orgs","repos_url":"https://api.github.com/users/ThomsonTan/repos","events_url":"https://api.github.com/users/ThomsonTan/events{/privacy}","received_events_url":"https://api.github.com/users/ThomsonTan/received_events","type":"User","site_admin":false},"body":"That will make the code behave a little different (like before the refactor). `fractionDigits` as `TaggedInt` will not be checked.\r\n\r\n---\r\nIn reply to: [100205438](https://github.com/Microsoft/ChakraCore/pull/2497#discussion_r100205438) [](ancestors = 100205438)","created_at":"2017-02-09T00:39:37Z","updated_at":"2017-02-09T00:39:37Z","html_url":"https://github.com/Microsoft/ChakraCore/pull/2497#discussion_r100207392","pull_request_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/100207392"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/2497#discussion_r100207392"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497","id":105335549,"html_url":"https://github.com/Microsoft/ChakraCore/pull/2497","diff_url":"https://github.com/Microsoft/ChakraCore/pull/2497.diff","patch_url":"https://github.com/Microsoft/ChakraCore/pull/2497.patch","issue_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/2497","number":2497,"state":"open","locked":false,"title":"Don't throw RangeError for toExponential(undefined)","user":{"login":"ThomsonTan","id":1041795,"avatar_url":"https://avatars.githubusercontent.com/u/1041795?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomsonTan","html_url":"https://github.com/ThomsonTan","followers_url":"https://api.github.com/users/ThomsonTan/followers","following_url":"https://api.github.com/users/ThomsonTan/following{/other_user}","gists_url":"https://api.github.com/users/ThomsonTan/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomsonTan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomsonTan/subscriptions","organizations_url":"https://api.github.com/users/ThomsonTan/orgs","repos_url":"https://api.github.com/users/ThomsonTan/repos","events_url":"https://api.github.com/users/ThomsonTan/events{/privacy}","received_events_url":"https://api.github.com/users/ThomsonTan/received_events","type":"User","site_admin":false},"body":"RangeError was raised for `Number.prototype.toExponential(undefined)` unexpectedly after refactoring range check (fraction should be between 1 to 20) out of else statement which converts non-integer and not undefined fractionDigits to integer. The spec also doesn't imply range error for it (see below link).\r\n\r\nhttp://www.ecma-international.org/ecma-262/6.0/#sec-number.prototype.toexponential","created_at":"2017-02-09T00:19:26Z","updated_at":"2017-02-09T00:39:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79ae4343fa0f7a36a55ccafb882b0d1923ce33ac","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497/commits","review_comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497/comments","review_comment_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/2497/comments","statuses_url":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/33f3ad269335dbafc7962733dfad1958eff56f0b","head":{"label":"ThomsonTan:FixToExponentialWithUndefined","ref":"FixToExponentialWithUndefined","sha":"33f3ad269335dbafc7962733dfad1958eff56f0b","user":{"login":"ThomsonTan","id":1041795,"avatar_url":"https://avatars.githubusercontent.com/u/1041795?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomsonTan","html_url":"https://github.com/ThomsonTan","followers_url":"https://api.github.com/users/ThomsonTan/followers","following_url":"https://api.github.com/users/ThomsonTan/following{/other_user}","gists_url":"https://api.github.com/users/ThomsonTan/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomsonTan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomsonTan/subscriptions","organizations_url":"https://api.github.com/users/ThomsonTan/orgs","repos_url":"https://api.github.com/users/ThomsonTan/repos","events_url":"https://api.github.com/users/ThomsonTan/events{/privacy}","received_events_url":"https://api.github.com/users/ThomsonTan/received_events","type":"User","site_admin":false},"repo":{"id":49595497,"name":"ChakraCore","full_name":"ThomsonTan/ChakraCore","owner":{"login":"ThomsonTan","id":1041795,"avatar_url":"https://avatars.githubusercontent.com/u/1041795?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomsonTan","html_url":"https://github.com/ThomsonTan","followers_url":"https://api.github.com/users/ThomsonTan/followers","following_url":"https://api.github.com/users/ThomsonTan/following{/other_user}","gists_url":"https://api.github.com/users/ThomsonTan/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomsonTan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomsonTan/subscriptions","organizations_url":"https://api.github.com/users/ThomsonTan/orgs","repos_url":"https://api.github.com/users/ThomsonTan/repos","events_url":"https://api.github.com/users/ThomsonTan/events{/privacy}","received_events_url":"https://api.github.com/users/ThomsonTan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThomsonTan/ChakraCore","description":"ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge","fork":true,"url":"https://api.github.com/repos/ThomsonTan/ChakraCore","forks_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/forks","keys_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/teams","hooks_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/hooks","issue_events_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/issues/events{/number}","events_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/events","assignees_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/assignees{/user}","branches_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/branches{/branch}","tags_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/tags","blobs_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/statuses/{sha}","languages_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/languages","stargazers_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/stargazers","contributors_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/contributors","subscribers_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/subscribers","subscription_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/subscription","commits_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/contents/{+path}","compare_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/merges","archive_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/downloads","issues_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/issues{/number}","pulls_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/pulls{/number}","milestones_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/milestones{/number}","notifications_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/labels{/name}","releases_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/releases{/id}","deployments_url":"https://api.github.com/repos/ThomsonTan/ChakraCore/deployments","created_at":"2016-01-13T19:09:50Z","updated_at":"2016-01-13T19:10:06Z","pushed_at":"2017-02-09T00:19:25Z","git_url":"git://github.com/ThomsonTan/ChakraCore.git","ssh_url":"git@github.com:ThomsonTan/ChakraCore.git","clone_url":"https://github.com/ThomsonTan/ChakraCore.git","svn_url":"https://github.com/ThomsonTan/ChakraCore","homepage":null,"size":52359,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:release/1.4","ref":"release/1.4","sha":"e64ae9a0e2906c6e8ccf0a64801dd6b80b285374","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":49086513,"name":"ChakraCore","full_name":"Microsoft/ChakraCore","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/ChakraCore","description":"ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge","fork":false,"url":"https://api.github.com/repos/Microsoft/ChakraCore","forks_url":"https://api.github.com/repos/Microsoft/ChakraCore/forks","keys_url":"https://api.github.com/repos/Microsoft/ChakraCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/ChakraCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/ChakraCore/teams","hooks_url":"https://api.github.com/repos/Microsoft/ChakraCore/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/ChakraCore/events","assignees_url":"https://api.github.com/repos/Microsoft/ChakraCore/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/ChakraCore/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/ChakraCore/tags","blobs_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/ChakraCore/languages","stargazers_url":"https://api.github.com/repos/Microsoft/ChakraCore/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/ChakraCore/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/ChakraCore/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/ChakraCore/subscription","commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/ChakraCore/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/ChakraCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/ChakraCore/merges","archive_url":"https://api.github.com/repos/Microsoft/ChakraCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/ChakraCore/downloads","issues_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/ChakraCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/ChakraCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/ChakraCore/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/ChakraCore/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/ChakraCore/deployments","created_at":"2016-01-05T19:05:31Z","updated_at":"2017-02-08T21:34:31Z","pushed_at":"2017-02-09T00:22:44Z","git_url":"git://github.com/Microsoft/ChakraCore.git","ssh_url":"git@github.com:Microsoft/ChakraCore.git","clone_url":"https://github.com/Microsoft/ChakraCore.git","svn_url":"https://github.com/Microsoft/ChakraCore","homepage":"","size":57785,"stargazers_count":6014,"watchers_count":6014,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":691,"mirror_url":null,"open_issues_count":230,"forks":691,"open_issues":230,"watchers":6014,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/2497"},"issue":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/2497"},"comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/2497/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/2497/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/33f3ad269335dbafc7962733dfad1958eff56f0b"}}}}
{"actor":{"display_login":"ThomsonTan"}}