{"action":"created","issue":{"url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/95","labels_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/95/comments","events_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/95/events","html_url":"https://github.com/barrysteyn/node-scrypt/issues/95","id":108010993,"number":95,"title":"unsafe use of arguments","user":{"login":"AVVS","id":1713617,"avatar_url":"https://avatars.githubusercontent.com/u/1713617?v=3","gravatar_id":"","url":"https://api.github.com/users/AVVS","html_url":"https://github.com/AVVS","followers_url":"https://api.github.com/users/AVVS/followers","following_url":"https://api.github.com/users/AVVS/following{/other_user}","gists_url":"https://api.github.com/users/AVVS/gists{/gist_id}","starred_url":"https://api.github.com/users/AVVS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AVVS/subscriptions","organizations_url":"https://api.github.com/users/AVVS/orgs","repos_url":"https://api.github.com/users/AVVS/repos","events_url":"https://api.github.com/users/AVVS/events{/privacy}","received_events_url":"https://api.github.com/users/AVVS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-23T21:31:49Z","updated_at":"2015-09-24T16:05:53Z","closed_at":null,"body":"1. https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\r\n\r\ninstead of passing reference of `arguments` to another function, we must make a copy before that.\r\nQuote from there:\r\n\r\n```js\r\n// Workaround for proxying is to create array in-line:\r\n\r\nfunction doesntLeakArguments() {\r\n                    //.length is just an integer, this doesn't leak\r\n                    //the arguments object itself\r\n    var args = new Array(arguments.length);\r\n    for(var i = 0; i < args.length; ++i) {\r\n                //i is always valid index in the arguments object\r\n        args[i] = arguments[i];\r\n    }\r\n    return args;\r\n}\r\nIt takes a lot of code and is annoying so it might be worth to analyze if it's really worth it. Then again optimizing always takes a lot of code when more code means more explicitly nailed down semantics.\r\n```"},"comment":{"url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/comments/142974228","html_url":"https://github.com/barrysteyn/node-scrypt/issues/95#issuecomment-142974228","issue_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/95","id":142974228,"user":{"login":"AVVS","id":1713617,"avatar_url":"https://avatars.githubusercontent.com/u/1713617?v=3","gravatar_id":"","url":"https://api.github.com/users/AVVS","html_url":"https://github.com/AVVS","followers_url":"https://api.github.com/users/AVVS/followers","following_url":"https://api.github.com/users/AVVS/following{/other_user}","gists_url":"https://api.github.com/users/AVVS/gists{/gist_id}","starred_url":"https://api.github.com/users/AVVS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AVVS/subscriptions","organizations_url":"https://api.github.com/users/AVVS/orgs","repos_url":"https://api.github.com/users/AVVS/repos","events_url":"https://api.github.com/users/AVVS/events{/privacy}","received_events_url":"https://api.github.com/users/AVVS/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T16:05:53Z","updated_at":"2015-09-24T16:05:53Z","body":"@barrysteyn absolutely"}}