{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/69820830","id":69820830,"diff_hunk":"@@ -858,10 +859,12 @@ namespace Js\n \n         for (uint i = 0; i < ownPropsArray->GetLength(); i++)\n         {\n-            ownPropsArray->DirectGetItemAt(i, &propKey);\n+            BOOL getPropResult = ownPropsArray->DirectGetItemAt(i, &propKey);\n+            Assert(getPropResult);","path":"lib/Runtime/Library/JavascriptObject.cpp","position":null,"original_position":14,"commit_id":"974dc29702388b923e31a1b738f98f513508c42c","original_commit_id":"974dc29702388b923e31a1b738f98f513508c42c","user":{"login":"jordonwii","id":667676,"avatar_url":"https://avatars.githubusercontent.com/u/667676?v=3","gravatar_id":"","url":"https://api.github.com/users/jordonwii","html_url":"https://github.com/jordonwii","followers_url":"https://api.github.com/users/jordonwii/followers","following_url":"https://api.github.com/users/jordonwii/following{/other_user}","gists_url":"https://api.github.com/users/jordonwii/gists{/gist_id}","starred_url":"https://api.github.com/users/jordonwii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordonwii/subscriptions","organizations_url":"https://api.github.com/users/jordonwii/orgs","repos_url":"https://api.github.com/users/jordonwii/repos","events_url":"https://api.github.com/users/jordonwii/events{/privacy}","received_events_url":"https://api.github.com/users/jordonwii/received_events","type":"User","site_admin":false},"body":"Assuming the object isn't a `Proxy`, `JavascriptOperators::GetOwnPropertyKeys` just returns the result of `JavascriptObject::CreateKeysHelper`, which is always a `JavascriptArray`.\r\n\r\nI understood @Yongqu to be concerned about catching a change in something along the chain of calls after `JavascriptOperators::GetOwnPropertyKeys` that such that it *doesn't* ultimately return an Array (hence an assert being appropriate here). I just noticed that `JavascriptArray::FromVar` would already catch such a case, though, since `FromVar` includes the assert:\r\n`AssertMsg(Is(aValue), \"Ensure var is actually a 'JavascriptArray'\");`\r\n\r\nSo the one I added is redundant, it looks like. \r\n\r\nBoth `JavascriptConversion::ToPropertyKey` and `ownPropsArray->DirectGetItemAt` return a BOOL indicating success/failure, although AFAICT the implementation of `JavascriptConversion::ToPropertyKey` *always* succeeds. That doesn't mean it always will, though, and `JavascriptObject::GetValuesOrEntries` currently includes an Assert identical to the one I added (see https://github.com/Microsoft/ChakraCore/blob/master/lib/Runtime/Library/JavascriptObject.cpp#L1202)","created_at":"2016-07-06T22:09:09Z","updated_at":"2016-07-06T22:09:09Z","html_url":"https://github.com/Microsoft/ChakraCore/pull/1202#discussion_r69820830","pull_request_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/69820830"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/1202#discussion_r69820830"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202","id":75221224,"html_url":"https://github.com/Microsoft/ChakraCore/pull/1202","diff_url":"https://github.com/Microsoft/ChakraCore/pull/1202.diff","patch_url":"https://github.com/Microsoft/ChakraCore/pull/1202.patch","issue_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1202","number":1202,"state":"open","locked":false,"title":"Initial implementation of Object.getOwnPropertyDescriptors.","user":{"login":"jordonwii","id":667676,"avatar_url":"https://avatars.githubusercontent.com/u/667676?v=3","gravatar_id":"","url":"https://api.github.com/users/jordonwii","html_url":"https://github.com/jordonwii","followers_url":"https://api.github.com/users/jordonwii/followers","following_url":"https://api.github.com/users/jordonwii/following{/other_user}","gists_url":"https://api.github.com/users/jordonwii/gists{/gist_id}","starred_url":"https://api.github.com/users/jordonwii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordonwii/subscriptions","organizations_url":"https://api.github.com/users/jordonwii/orgs","repos_url":"https://api.github.com/users/jordonwii/repos","events_url":"https://api.github.com/users/jordonwii/events{/privacy}","received_events_url":"https://api.github.com/users/jordonwii/received_events","type":"User","site_admin":false},"body":"Fixes #254 \r\n\r\nThis is a rough implementation based on a combination of getOwnPropertyDescriptor as a reference, and what I could intuit from a day of digging. \r\n\r\nI'd appreciate as much feedback as possible on how I did this. I used existing functions I was aware of when possible, but if there are better choices of helper functions here, please do let me know. I also did the tests all in javascript (similar to what I could find on getOwnPropertyDescriptor), and tried to make them as thorough as possible.","created_at":"2016-06-26T04:27:35Z","updated_at":"2016-07-06T22:09:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"353adb8a7c4ceb601990e0a9f03791eac4e8c96d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202/commits","review_comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202/comments","review_comment_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1202/comments","statuses_url":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/974dc29702388b923e31a1b738f98f513508c42c","head":{"label":"jordonwii:issue254_getownpropertydescriptors","ref":"issue254_getownpropertydescriptors","sha":"974dc29702388b923e31a1b738f98f513508c42c","user":{"login":"jordonwii","id":667676,"avatar_url":"https://avatars.githubusercontent.com/u/667676?v=3","gravatar_id":"","url":"https://api.github.com/users/jordonwii","html_url":"https://github.com/jordonwii","followers_url":"https://api.github.com/users/jordonwii/followers","following_url":"https://api.github.com/users/jordonwii/following{/other_user}","gists_url":"https://api.github.com/users/jordonwii/gists{/gist_id}","starred_url":"https://api.github.com/users/jordonwii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordonwii/subscriptions","organizations_url":"https://api.github.com/users/jordonwii/orgs","repos_url":"https://api.github.com/users/jordonwii/repos","events_url":"https://api.github.com/users/jordonwii/events{/privacy}","received_events_url":"https://api.github.com/users/jordonwii/received_events","type":"User","site_admin":false},"repo":{"id":49756588,"name":"ChakraCore","full_name":"jordonwii/ChakraCore","owner":{"login":"jordonwii","id":667676,"avatar_url":"https://avatars.githubusercontent.com/u/667676?v=3","gravatar_id":"","url":"https://api.github.com/users/jordonwii","html_url":"https://github.com/jordonwii","followers_url":"https://api.github.com/users/jordonwii/followers","following_url":"https://api.github.com/users/jordonwii/following{/other_user}","gists_url":"https://api.github.com/users/jordonwii/gists{/gist_id}","starred_url":"https://api.github.com/users/jordonwii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordonwii/subscriptions","organizations_url":"https://api.github.com/users/jordonwii/orgs","repos_url":"https://api.github.com/users/jordonwii/repos","events_url":"https://api.github.com/users/jordonwii/events{/privacy}","received_events_url":"https://api.github.com/users/jordonwii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jordonwii/ChakraCore","description":"ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge","fork":true,"url":"https://api.github.com/repos/jordonwii/ChakraCore","forks_url":"https://api.github.com/repos/jordonwii/ChakraCore/forks","keys_url":"https://api.github.com/repos/jordonwii/ChakraCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jordonwii/ChakraCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jordonwii/ChakraCore/teams","hooks_url":"https://api.github.com/repos/jordonwii/ChakraCore/hooks","issue_events_url":"https://api.github.com/repos/jordonwii/ChakraCore/issues/events{/number}","events_url":"https://api.github.com/repos/jordonwii/ChakraCore/events","assignees_url":"https://api.github.com/repos/jordonwii/ChakraCore/assignees{/user}","branches_url":"https://api.github.com/repos/jordonwii/ChakraCore/branches{/branch}","tags_url":"https://api.github.com/repos/jordonwii/ChakraCore/tags","blobs_url":"https://api.github.com/repos/jordonwii/ChakraCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jordonwii/ChakraCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jordonwii/ChakraCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/jordonwii/ChakraCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jordonwii/ChakraCore/statuses/{sha}","languages_url":"https://api.github.com/repos/jordonwii/ChakraCore/languages","stargazers_url":"https://api.github.com/repos/jordonwii/ChakraCore/stargazers","contributors_url":"https://api.github.com/repos/jordonwii/ChakraCore/contributors","subscribers_url":"https://api.github.com/repos/jordonwii/ChakraCore/subscribers","subscription_url":"https://api.github.com/repos/jordonwii/ChakraCore/subscription","commits_url":"https://api.github.com/repos/jordonwii/ChakraCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/jordonwii/ChakraCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/jordonwii/ChakraCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/jordonwii/ChakraCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/jordonwii/ChakraCore/contents/{+path}","compare_url":"https://api.github.com/repos/jordonwii/ChakraCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jordonwii/ChakraCore/merges","archive_url":"https://api.github.com/repos/jordonwii/ChakraCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jordonwii/ChakraCore/downloads","issues_url":"https://api.github.com/repos/jordonwii/ChakraCore/issues{/number}","pulls_url":"https://api.github.com/repos/jordonwii/ChakraCore/pulls{/number}","milestones_url":"https://api.github.com/repos/jordonwii/ChakraCore/milestones{/number}","notifications_url":"https://api.github.com/repos/jordonwii/ChakraCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jordonwii/ChakraCore/labels{/name}","releases_url":"https://api.github.com/repos/jordonwii/ChakraCore/releases{/id}","deployments_url":"https://api.github.com/repos/jordonwii/ChakraCore/deployments","created_at":"2016-01-16T02:55:48Z","updated_at":"2016-01-16T02:56:03Z","pushed_at":"2016-07-06T16:42:46Z","git_url":"git://github.com/jordonwii/ChakraCore.git","ssh_url":"git@github.com:jordonwii/ChakraCore.git","clone_url":"https://github.com/jordonwii/ChakraCore.git","svn_url":"https://github.com/jordonwii/ChakraCore","homepage":null,"size":31014,"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:master","ref":"master","sha":"f0a9fa7e49b19880ebb81e44645b23269cdd545c","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":"2016-07-06T19:22:58Z","pushed_at":"2016-07-06T22:00:06Z","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":null,"size":42963,"stargazers_count":5329,"watchers_count":5329,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":600,"mirror_url":null,"open_issues_count":153,"forks":600,"open_issues":153,"watchers":5329,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/1202"},"issue":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1202"},"comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1202/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1202/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/974dc29702388b923e31a1b738f98f513508c42c"}}}}
{"actor":{"display_login":"jordonwii"}}