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:Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By:
Jackson Tian <shvyo1987@gmail.com>
parent
a634554f
Please register or sign in to comment