Uh oh!
There was an error while loading. Please reload this page.
vm: migrate isContext to internal/errors - #19268
Conversation
TimothyGu
commented
Mar 9, 2018
| } | ||
| function isContext(sandbox) { | ||
| if (arguments.length < 1) { |
There was a problem hiding this comment.
Do we need this one though? If sandbox is undefined, it will show up as a ERR_INVALID_ARG_TYPE as well, it seems rare that someone would just do “isContext()”
| throw new ERR_MISSING_ARGS('sandbox'); | ||
| } | ||
| if (typeof sandbox !== 'object' && typeof sandbox !== 'function' || |
There was a problem hiding this comment.
I'm not sure we want to accept functions?
There was a problem hiding this comment.
I believe that’s just for compatibility: the original ->IsObject() test accepts functions.
PR-URL: #19268 Refs: #18106 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos
commented
Mar 22, 2018
Landed in 49b2969 |
The documentation states: > This is only used for strict compliance with the API specification > (which in some cases may accept func(undefined) but not func()). In > most native Node.js APIs, func(undefined) and func() are treated > identically, and the ERR_INVALID_ARG_TYPE error code may be used > instead. Refs: nodejs#19268 (comment)
MylesBorins
commented
Apr 2, 2018
was CITGM run against this? |
TimothyGu
commented
Apr 2, 2018
No, I don't think anyone thought about running it. Is CITGM broken right now? |
MylesBorins
commented
Apr 2, 2018
we should generally run for semver-major. Have not checked yet but noticed that a related PR #19398 was breaking stuff. Have not checked citgm against master in a while myself. Can take a peek this week |
Refs: #18106
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes