lib: copy arguments object instead of leaking it
authorNathan Woltman <nwoltman@outlook.com>
Sun, 20 Dec 2015 07:01:34 +0000 (02:01 -0500)
committerMyles Borins <mborins@us.ibm.com>
Wed, 30 Mar 2016 20:12:12 +0000 (13:12 -0700)
commit3c8e59c3965d81ab5c0656423e987665a47ddcdf
treeea1d5c39394a24b4d0d39cc28bb78a619de5c7af
parenteb0ed46665d73ec12933dc4064013120fe0ff51d
lib: copy arguments object instead of leaking it

Instead of leaking the arguments object by passing it as an
argument to a function, copy it's contents to a new array,
then pass the array. This allows V8 to optimize the function
that contains this code, improving performance.

PR-URL: https://github.com/nodejs/node/pull/4361
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
lib/_http_client.js
lib/_tls_wrap.js
lib/assert.js
lib/console.js
lib/net.js