child_process: refactor self=this in socket_list
authorBenjamin Gruenbaum <inglor@gmail.com>
Wed, 23 Mar 2016 09:49:12 +0000 (11:49 +0200)
committerMyles Borins <mborins@us.ibm.com>
Fri, 8 Apr 2016 21:34:18 +0000 (17:34 -0400)
commitd275cdf2021174b3f0aab04c74c5874b6bb10f41
tree3d02bd15cb62c5944d66fbba0a13769782267240
parente0b283af732ab07773fb6585a00765eba9ade13c
child_process: refactor self=this in socket_list

The socket list module (used by child_process) currently uses the
`var self = this;` pattern for context in several places, this PR
replaces this with arrow functions or passing a parameter in where
appropriate.

Note that the `var self = this` in the _request is intentioanlly
left in place since it is not trivial to refactor it and the current
pattern isn't bad given the use case.

PR-URL: https://github.com/nodejs/node/pull/5860
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
lib/internal/socket_list.js