{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/41227071","id":41227071,"diff_hunk":"@@ -0,0 +1,33 @@\n+'use strict';\n+const common = require('../common');\n+const assert = require('assert');\n+const active = require('timers').active;\n+\n+// active() should create timers for these\n+var legitTimers = [\n+  { _idleTimeout: 0 },\n+  { _idleTimeout: 1 }\n+];\n+\n+legitTimers.forEach(function(legit) {\n+  const savedTimeout = legit._idleTimeout;\n+  active(legit);\n+  // active() should mutate these objects\n+  assert(legit._idleTimeout === savedTimeout);\n+  assert(Number.isInteger(legit._idleStart));\n+  assert(legit._idleNext);\n+  assert(legit._idlePrev);\n+});\n+\n+\n+// active() should not create a timer for these\n+var bogusTimers = [\n+  { _idleTimeout: -1 }\n+];\n+\n+bogusTimers.forEach(function(bogus) {\n+  const savedTimeout = bogus._idleTimeout;\n+  active(bogus);\n+  // active() should not mutate these objects","path":"test/parallel/test-timers-active.js","position":31,"original_position":31,"commit_id":"17e09ecc8057e92fdbb6ae9360e5df8e04cd78b0","original_commit_id":"17e09ecc8057e92fdbb6ae9360e5df8e04cd78b0","user":{"login":"thefourtheye","id":696611,"avatar_url":"https://avatars.githubusercontent.com/u/696611?v=3","gravatar_id":"","url":"https://api.github.com/users/thefourtheye","html_url":"https://github.com/thefourtheye","followers_url":"https://api.github.com/users/thefourtheye/followers","following_url":"https://api.github.com/users/thefourtheye/following{/other_user}","gists_url":"https://api.github.com/users/thefourtheye/gists{/gist_id}","starred_url":"https://api.github.com/users/thefourtheye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefourtheye/subscriptions","organizations_url":"https://api.github.com/users/thefourtheye/orgs","repos_url":"https://api.github.com/users/thefourtheye/repos","events_url":"https://api.github.com/users/thefourtheye/events{/privacy}","received_events_url":"https://api.github.com/users/thefourtheye/received_events","type":"User","site_admin":false},"body":"Nit: these?","created_at":"2015-10-06T05:28:44Z","updated_at":"2015-10-06T05:28:44Z","html_url":"https://github.com/nodejs/node/pull/3143#discussion_r41227071","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/3143","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/41227071"},"html":{"href":"https://github.com/nodejs/node/pull/3143#discussion_r41227071"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/3143"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/3143","id":46485870,"html_url":"https://github.com/nodejs/node/pull/3143","diff_url":"https://github.com/nodejs/node/pull/3143.diff","patch_url":"https://github.com/nodejs/node/pull/3143.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/3143","number":3143,"state":"open","locked":false,"title":"lib: remove redundant code from timers.js","user":{"login":"Trott","id":718899,"avatar_url":"https://avatars.githubusercontent.com/u/718899?v=3","gravatar_id":"","url":"https://api.github.com/users/Trott","html_url":"https://github.com/Trott","followers_url":"https://api.github.com/users/Trott/followers","following_url":"https://api.github.com/users/Trott/following{/other_user}","gists_url":"https://api.github.com/users/Trott/gists{/gist_id}","starred_url":"https://api.github.com/users/Trott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trott/subscriptions","organizations_url":"https://api.github.com/users/Trott/orgs","repos_url":"https://api.github.com/users/Trott/repos","events_url":"https://api.github.com/users/Trott/events{/privacy}","received_events_url":"https://api.github.com/users/Trott/received_events","type":"User","site_admin":false},"body":"insert() is only [called from one place where there is already a check\r\nthat msecs is greater than or equal to zero](https://github.com/nodejs/node/blob/master/lib/timers.js#L163-L164), so do not repeat the check\r\ninside insert().","created_at":"2015-10-01T05:21:46Z","updated_at":"2015-10-06T05:28:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"838d416122fdb5b72e5f9c4ccd9249053d8e088d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/3143/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/3143/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/3143/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/17e09ecc8057e92fdbb6ae9360e5df8e04cd78b0","head":{"label":"Trott:timer-tweak","ref":"timer-tweak","sha":"17e09ecc8057e92fdbb6ae9360e5df8e04cd78b0","user":{"login":"Trott","id":718899,"avatar_url":"https://avatars.githubusercontent.com/u/718899?v=3","gravatar_id":"","url":"https://api.github.com/users/Trott","html_url":"https://github.com/Trott","followers_url":"https://api.github.com/users/Trott/followers","following_url":"https://api.github.com/users/Trott/following{/other_user}","gists_url":"https://api.github.com/users/Trott/gists{/gist_id}","starred_url":"https://api.github.com/users/Trott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trott/subscriptions","organizations_url":"https://api.github.com/users/Trott/orgs","repos_url":"https://api.github.com/users/Trott/repos","events_url":"https://api.github.com/users/Trott/events{/privacy}","received_events_url":"https://api.github.com/users/Trott/received_events","type":"User","site_admin":false},"repo":{"id":35707182,"name":"io.js","full_name":"Trott/io.js","owner":{"login":"Trott","id":718899,"avatar_url":"https://avatars.githubusercontent.com/u/718899?v=3","gravatar_id":"","url":"https://api.github.com/users/Trott","html_url":"https://github.com/Trott","followers_url":"https://api.github.com/users/Trott/followers","following_url":"https://api.github.com/users/Trott/following{/other_user}","gists_url":"https://api.github.com/users/Trott/gists{/gist_id}","starred_url":"https://api.github.com/users/Trott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trott/subscriptions","organizations_url":"https://api.github.com/users/Trott/orgs","repos_url":"https://api.github.com/users/Trott/repos","events_url":"https://api.github.com/users/Trott/events{/privacy}","received_events_url":"https://api.github.com/users/Trott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Trott/io.js","description":"A friendly fork of Node.js with an open governance model","fork":true,"url":"https://api.github.com/repos/Trott/io.js","forks_url":"https://api.github.com/repos/Trott/io.js/forks","keys_url":"https://api.github.com/repos/Trott/io.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Trott/io.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Trott/io.js/teams","hooks_url":"https://api.github.com/repos/Trott/io.js/hooks","issue_events_url":"https://api.github.com/repos/Trott/io.js/issues/events{/number}","events_url":"https://api.github.com/repos/Trott/io.js/events","assignees_url":"https://api.github.com/repos/Trott/io.js/assignees{/user}","branches_url":"https://api.github.com/repos/Trott/io.js/branches{/branch}","tags_url":"https://api.github.com/repos/Trott/io.js/tags","blobs_url":"https://api.github.com/repos/Trott/io.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Trott/io.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Trott/io.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Trott/io.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Trott/io.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Trott/io.js/languages","stargazers_url":"https://api.github.com/repos/Trott/io.js/stargazers","contributors_url":"https://api.github.com/repos/Trott/io.js/contributors","subscribers_url":"https://api.github.com/repos/Trott/io.js/subscribers","subscription_url":"https://api.github.com/repos/Trott/io.js/subscription","commits_url":"https://api.github.com/repos/Trott/io.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Trott/io.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Trott/io.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Trott/io.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Trott/io.js/contents/{+path}","compare_url":"https://api.github.com/repos/Trott/io.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Trott/io.js/merges","archive_url":"https://api.github.com/repos/Trott/io.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Trott/io.js/downloads","issues_url":"https://api.github.com/repos/Trott/io.js/issues{/number}","pulls_url":"https://api.github.com/repos/Trott/io.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Trott/io.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Trott/io.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Trott/io.js/labels{/name}","releases_url":"https://api.github.com/repos/Trott/io.js/releases{/id}","created_at":"2015-05-16T02:50:59Z","updated_at":"2015-05-16T02:51:03Z","pushed_at":"2015-10-06T04:22:43Z","git_url":"git://github.com/Trott/io.js.git","ssh_url":"git@github.com:Trott/io.js.git","clone_url":"https://github.com/Trott/io.js.git","svn_url":"https://github.com/Trott/io.js","homepage":"https://iojs.org","size":145371,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"88533881dd296236a44ad36aa7afb8336298540f","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"✨Node.js  ✨","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","created_at":"2014-11-26T19:57:11Z","updated_at":"2015-10-06T04:50:27Z","pushed_at":"2015-10-06T04:30:35Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":368011,"stargazers_count":15828,"watchers_count":15828,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1469,"mirror_url":null,"open_issues_count":507,"forks":1469,"open_issues":507,"watchers":15828,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/3143"},"html":{"href":"https://github.com/nodejs/node/pull/3143"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/3143"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/3143/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/3143/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/3143/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/17e09ecc8057e92fdbb6ae9360e5df8e04cd78b0"}}}}