Commit e9b6fbbf authored by Claudio Rodriguez's avatar Claudio Rodriguez
Browse files

dgram: prefer strict equality, type validation

- Enforces strict comparisons in dgram - bindState should
always be strictly equal to one of the defined constant states,
and newHandle type is a string.

- Check that the argument `type` in createSocket is not null
when it is of type 'object', before using its `type` property.

- Adds a test to check dgram.createSocket is properly
validating its `type` argument.

PR-URL: https://github.com/nodejs/node/pull/8011


Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarYorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: default avatarJackson Tian <shvyo1987@gmail.com>
parent a634554f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment