Skip to content

Commit

Permalink
dgram: prevent disabled optimization of bind()
Browse files Browse the repository at this point in the history
Reassigning a named parameter while also using the arguments
object causes the entire function to never be optimized.

PR-URL: #4613
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
mscdex authored and jasnell committed Jan 13, 2016
1 parent 3c70dc8 commit 88b2889
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 88b2889

Please sign in to comment.