From 88b28896790023ae4653eefbc6687bbf0046c00c Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 10 Jan 2016 17:52:13 -0500 Subject: [PATCH] dgram: prevent disabled optimization of bind() Reassigning a named parameter while also using the arguments object causes the entire function to never be optimized. PR-URL: https://github.com/nodejs/node/pull/4613 Reviewed-By: Roman Reiss Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/dgram.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dgram.js b/lib/dgram.js index b8ffb1f92c5790..c070475a224d31 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -134,8 +134,9 @@ function replaceHandle(self, newHandle) { self._handle = newHandle; } -Socket.prototype.bind = function(port /*, address, callback*/) { +Socket.prototype.bind = function(port_ /*, address, callback*/) { var self = this; + let port = port_; self._healthCheck();