{"action":"reopened","number":5650,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/5650","id":62476533,"html_url":"https://github.com/nodejs/node/pull/5650","diff_url":"https://github.com/nodejs/node/pull/5650.diff","patch_url":"https://github.com/nodejs/node/pull/5650.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/5650","number":5650,"state":"open","locked":false,"title":"[querystring] avoid Object.prototype conflicts including `__proto__`","user":{"login":"WebReflection","id":85749,"avatar_url":"https://avatars.githubusercontent.com/u/85749?v=3","gravatar_id":"","url":"https://api.github.com/users/WebReflection","html_url":"https://github.com/WebReflection","followers_url":"https://api.github.com/users/WebReflection/followers","following_url":"https://api.github.com/users/WebReflection/following{/other_user}","gists_url":"https://api.github.com/users/WebReflection/gists{/gist_id}","starred_url":"https://api.github.com/users/WebReflection/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebReflection/subscriptions","organizations_url":"https://api.github.com/users/WebReflection/orgs","repos_url":"https://api.github.com/users/WebReflection/repos","events_url":"https://api.github.com/users/WebReflection/events{/privacy}","received_events_url":"https://api.github.com/users/WebReflection/received_events","type":"User","site_admin":false},"body":"In order to solve https://github.com/nodejs/node/issues/5642 , keeping an eye and actually most likely improving performance for https://github.com/nodejs/node/issues/728 , this PR is meant to show a better way to deal with inheritance.\r\n\r\nMostly all problems would be solved using `const obj = Object.create(null);` instead of `const obj = {};` on top, but we all know that's going to break around more code than it will solve.\r\n\r\nThis PR is one option, the alternative is to grab, each time, at runtime, `Object.getOwnPropertyNames(Object.prototype)` and use **double `indexOf`** per each key, one for the known keys in object, one for the known keys in its prototype in case keys in object aren't known.\r\n\r\nAs most common CS related problem say, \"hashes\" are faster than `O(N*?)` searches in an array and this is the reason I've proposed a solution based on `in` operator first, but we know JS hases aren't even close to be comparable to structs or heap operations.","created_at":"2016-03-10T23:51:09Z","updated_at":"2016-03-11T00:14:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e93d9c0ab1df3e6e2d391953421d067caafdf39e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/5650/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/5650/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/5650/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/9f8f0c39307fd22e8a8912d1946c946f598eb98e","head":{"label":"WebReflection:master","ref":"master","sha":"9f8f0c39307fd22e8a8912d1946c946f598eb98e","user":{"login":"WebReflection","id":85749,"avatar_url":"https://avatars.githubusercontent.com/u/85749?v=3","gravatar_id":"","url":"https://api.github.com/users/WebReflection","html_url":"https://github.com/WebReflection","followers_url":"https://api.github.com/users/WebReflection/followers","following_url":"https://api.github.com/users/WebReflection/following{/other_user}","gists_url":"https://api.github.com/users/WebReflection/gists{/gist_id}","starred_url":"https://api.github.com/users/WebReflection/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebReflection/subscriptions","organizations_url":"https://api.github.com/users/WebReflection/orgs","repos_url":"https://api.github.com/users/WebReflection/repos","events_url":"https://api.github.com/users/WebReflection/events{/privacy}","received_events_url":"https://api.github.com/users/WebReflection/received_events","type":"User","site_admin":false},"repo":{"id":53625050,"name":"node","full_name":"WebReflection/node","owner":{"login":"WebReflection","id":85749,"avatar_url":"https://avatars.githubusercontent.com/u/85749?v=3","gravatar_id":"","url":"https://api.github.com/users/WebReflection","html_url":"https://github.com/WebReflection","followers_url":"https://api.github.com/users/WebReflection/followers","following_url":"https://api.github.com/users/WebReflection/following{/other_user}","gists_url":"https://api.github.com/users/WebReflection/gists{/gist_id}","starred_url":"https://api.github.com/users/WebReflection/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebReflection/subscriptions","organizations_url":"https://api.github.com/users/WebReflection/orgs","repos_url":"https://api.github.com/users/WebReflection/repos","events_url":"https://api.github.com/users/WebReflection/events{/privacy}","received_events_url":"https://api.github.com/users/WebReflection/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WebReflection/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/WebReflection/node","forks_url":"https://api.github.com/repos/WebReflection/node/forks","keys_url":"https://api.github.com/repos/WebReflection/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebReflection/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebReflection/node/teams","hooks_url":"https://api.github.com/repos/WebReflection/node/hooks","issue_events_url":"https://api.github.com/repos/WebReflection/node/issues/events{/number}","events_url":"https://api.github.com/repos/WebReflection/node/events","assignees_url":"https://api.github.com/repos/WebReflection/node/assignees{/user}","branches_url":"https://api.github.com/repos/WebReflection/node/branches{/branch}","tags_url":"https://api.github.com/repos/WebReflection/node/tags","blobs_url":"https://api.github.com/repos/WebReflection/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebReflection/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebReflection/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebReflection/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebReflection/node/statuses/{sha}","languages_url":"https://api.github.com/repos/WebReflection/node/languages","stargazers_url":"https://api.github.com/repos/WebReflection/node/stargazers","contributors_url":"https://api.github.com/repos/WebReflection/node/contributors","subscribers_url":"https://api.github.com/repos/WebReflection/node/subscribers","subscription_url":"https://api.github.com/repos/WebReflection/node/subscription","commits_url":"https://api.github.com/repos/WebReflection/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebReflection/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebReflection/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebReflection/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebReflection/node/contents/{+path}","compare_url":"https://api.github.com/repos/WebReflection/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebReflection/node/merges","archive_url":"https://api.github.com/repos/WebReflection/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebReflection/node/downloads","issues_url":"https://api.github.com/repos/WebReflection/node/issues{/number}","pulls_url":"https://api.github.com/repos/WebReflection/node/pulls{/number}","milestones_url":"https://api.github.com/repos/WebReflection/node/milestones{/number}","notifications_url":"https://api.github.com/repos/WebReflection/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebReflection/node/labels{/name}","releases_url":"https://api.github.com/repos/WebReflection/node/releases{/id}","deployments_url":"https://api.github.com/repos/WebReflection/node/deployments","created_at":"2016-03-10T23:34:19Z","updated_at":"2016-03-10T23:34:30Z","pushed_at":"2016-03-10T23:39:34Z","git_url":"git://github.com/WebReflection/node.git","ssh_url":"git@github.com:WebReflection/node.git","clone_url":"https://github.com/WebReflection/node.git","svn_url":"https://github.com/WebReflection/node","homepage":"https://nodejs.org","size":185451,"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":"nodejs:master","ref":"master","sha":"0ea3899cabfebc764b8dedbd64d306b54db81fa6","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 JavaScript runtime :sparkles::turtle::rocket::sparkles:","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}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2016-03-10T23:54:34Z","pushed_at":"2016-03-10T23:51:10Z","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":217050,"stargazers_count":20904,"watchers_count":20904,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2677,"mirror_url":null,"open_issues_count":740,"forks":2677,"open_issues":740,"watchers":20904,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/5650"},"html":{"href":"https://github.com/nodejs/node/pull/5650"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/5650"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/5650/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/5650/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/5650/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/9f8f0c39307fd22e8a8912d1946c946f598eb98e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":61,"deletions":26,"changed_files":1}}