{"action":"created","issue":{"url":"https://api.github.com/repos/kangax/compat-table/issues/594","labels_url":"https://api.github.com/repos/kangax/compat-table/issues/594/labels{/name}","comments_url":"https://api.github.com/repos/kangax/compat-table/issues/594/comments","events_url":"https://api.github.com/repos/kangax/compat-table/issues/594/events","html_url":"https://github.com/kangax/compat-table/issues/594","id":97991894,"number":594,"title":"Incorrect Proxy tests","user":{"login":"anba","id":1447066,"avatar_url":"https://avatars.githubusercontent.com/u/1447066?v=3","gravatar_id":"","url":"https://api.github.com/users/anba","html_url":"https://github.com/anba","followers_url":"https://api.github.com/users/anba/followers","following_url":"https://api.github.com/users/anba/following{/other_user}","gists_url":"https://api.github.com/users/anba/gists{/gist_id}","starred_url":"https://api.github.com/users/anba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anba/subscriptions","organizations_url":"https://api.github.com/users/anba/orgs","repos_url":"https://api.github.com/users/anba/repos","events_url":"https://api.github.com/users/anba/events{/privacy}","received_events_url":"https://api.github.com/users/anba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"webbedspace","id":83939,"avatar_url":"https://avatars.githubusercontent.com/u/83939?v=3","gravatar_id":"","url":"https://api.github.com/users/webbedspace","html_url":"https://github.com/webbedspace","followers_url":"https://api.github.com/users/webbedspace/followers","following_url":"https://api.github.com/users/webbedspace/following{/other_user}","gists_url":"https://api.github.com/users/webbedspace/gists{/gist_id}","starred_url":"https://api.github.com/users/webbedspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webbedspace/subscriptions","organizations_url":"https://api.github.com/users/webbedspace/orgs","repos_url":"https://api.github.com/users/webbedspace/repos","events_url":"https://api.github.com/users/webbedspace/events{/privacy}","received_events_url":"https://api.github.com/users/webbedspace/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-07-29T17:51:47Z","updated_at":"2015-07-30T11:53:44Z","closed_at":null,"body":"1. \"Proxy, internal 'get' calls - ToPrimitive\"\r\n\r\n  The result array is `[ Symbol(Symbol.toPrimitive), \"valueOf\", \"toString\", Symbol(Symbol.toStringTag) ]`, `Object.prototype.toString` step 16 performs [[Get]] for `Symbol.toStringTag`\r\n\r\n\r\n2. \"Proxy, internal 'get' calls - HasBinding\"\r\n\r\n  The proxy's target object needs to be `{foo: <some value>}`, the result array is then `[ Symbol(Symbol.unscopables), \"foo\", \"foo\" ]`. 8.1.1.2.1 HasBinding(N), step 5. \r\n\r\n3. \"Proxy, internal 'get' calls - RegExp constructor\"\r\n\r\n  The result array should be `[ Symbol(Symbol.match), \"constructor\", \"source\", \"flags\" ]`, cf. 21.2.3 The RegExp Constructor, step 1 and 7.2.8 IsRegExp, step 2\r\n\r\n4. \"Proxy, internal 'get' calls - RegExp.prototype[Symbol.split]\"\r\n\r\n  The proxy target needs to have a valid `flags` property, cf. RegExp.prototype \\[ @@ split ] ( string, limit ), step 7 and 21.2.3.2.2 Runtime Semantics: RegExpInitialize, step 7. \r\n  The result array is then going to be `[ \"constructor\", \"flags\", Symbol(Symbol.match), Symbol(Symbol.toPrimitive), \"toString\", Symbol(Symbol.toStringTag) ]`. The last three entries are caused by 21.2.3.2.2 Runtime Semantics: RegExpInitialize, step 2.\r\n\r\n5. \"Proxy, internal 'get' calls - Array.prototype.concat\"\r\n\r\n  `arr.constructor = void 0` to execute 9.4.2.3 ArraySpeciesCreate step 7, otherwise step 8 throws a TypeError. The result array is then `[ \"constructor\", Symbol(Symbol.isConcatSpreadable), \"length\", \"0\", Symbol(Symbol.isConcatSpreadable), \"length\", \"0\" ]`.\r\n\r\n6. \"Proxy, internal 'get' calls - Array.prototype.splice\"\r\n\r\n  The correct result array should be `[ \"length\", \"constructor\", \"1\", \"2\", \"3\", \"length\", \"constructor\", \"2\", \"1\" ]`.\r\n\r\n7. \"Proxy, internal 'get' calls - Array.prototype.toString\"\r\n\r\n  The correct result array is: `[ \"join\", Symbol(Symbol.toStringTag) ]`\r\n\r\n8. \"Proxy, internal 'get' calls - String.prototype.match\"\r\n\r\n  The call should be `String.prototype.match.call(\"\", p)`.\r\n  The result array is then: `[ Symbol(Symbol.match), Symbol(Symbol.toPrimitive), \"toString\", Symbol(Symbol.toStringTag) ]`\r\n  Similar issues in \"Proxy, internal 'get' calls - String.prototype.replace\", \"Proxy, internal 'get' calls - String.prototype.search\" and \"Proxy, internal 'get' calls - String.prototype.split\".\r\n\r\n9. \"Proxy, internal 'get' calls - Date.prototype.toJSON\"\r\n\r\n  The proxy target needs to define a `toISOString` method, cf. 20.3.4.37 Date.prototype.toJSON, step 5. The correct result array is: `[ Symbol(Symbol.toPrimitive), \"valueOf\", \"toString\", Symbol(Symbol.toStringTag), \"toISOString\" ]`\r\n\r\n10. \"Proxy, internal 'set' calls - Array.prototype.splice\"\r\n\r\n  The correct result array is: `[ \"3\", \"2\", \"1\", \"length\" ]`. The loop in 22.1.3.25 Array.prototype.splice, step 21 runs backwards.\r\n\r\n11. \"Proxy, internal 'set' calls - Array.prototype.unshift\"\r\n\r\n  The correct result array is: `[ \"5\", \"3\", \"2\", \"0\", \"1\", \"length\" ]`. See 22.1.3.28 Array.prototype.unshift, step 7\r\n\r\n12. \"Proxy, internal 'deleteProperty' calls - ArraySetLength\"\r\n\r\n  This test is invalid, the `A` parameter of 9.4.2.4 ArraySetLength is an Array exotic object, not the original receiver object. That means it's not possible to observe the calls to [[Delete]] in step 19b."},"comment":{"url":"https://api.github.com/repos/kangax/compat-table/issues/comments/126290847","html_url":"https://github.com/kangax/compat-table/issues/594#issuecomment-126290847","issue_url":"https://api.github.com/repos/kangax/compat-table/issues/594","id":126290847,"user":{"login":"webbedspace","id":83939,"avatar_url":"https://avatars.githubusercontent.com/u/83939?v=3","gravatar_id":"","url":"https://api.github.com/users/webbedspace","html_url":"https://github.com/webbedspace","followers_url":"https://api.github.com/users/webbedspace/followers","following_url":"https://api.github.com/users/webbedspace/following{/other_user}","gists_url":"https://api.github.com/users/webbedspace/gists{/gist_id}","starred_url":"https://api.github.com/users/webbedspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webbedspace/subscriptions","organizations_url":"https://api.github.com/users/webbedspace/orgs","repos_url":"https://api.github.com/users/webbedspace/repos","events_url":"https://api.github.com/users/webbedspace/events{/privacy}","received_events_url":"https://api.github.com/users/webbedspace/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T11:53:44Z","updated_at":"2015-07-30T11:53:44Z","body":"In 19f6846 I modified various tests that unwittingly (as in, as an unanticipated side-effect) called Object#toString, ToPrimitive, etc. so that their proxied objects now have empty own methods that overrie these, so that the observed calls are limited (where feasible) to those unique to the tested internal method. If you see any more problems, then do tell."}}