-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: remove throws in set/getHiddenValue #16544
Conversation
9e54ea8
to
c322f6b
Compare
@@ -287,7 +287,8 @@ function REPLServer(prompt, | |||
const top = replMap.get(self); | |||
const pstrace = Error.prepareStackTrace; | |||
Error.prepareStackTrace = prepareStackTrace(pstrace); | |||
internalUtil.decorateErrorStack(e); | |||
if (typeof e === 'object') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to protect against the odd random non-object being emitted on the domain error event. If e
is not an object, it will trigger the CHECK
test/parallel/test-util-internal.js
Outdated
assert.throws(getHiddenValue(85, 'foo'), errMessageObj); | ||
assert.throws(getHiddenValue({}), errMessageIndex); | ||
assert.throws(getHiddenValue({}, null), errMessageIndex); | ||
assert.throws(getHiddenValue({}, []), errMessageIndex); | ||
assert.deepStrictEqual( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: not sure why this uses deepStrictEqual
. I think it should be strictEqual
.
ping @nodejs/tsc |
These are internal only utility functions, CHECK instead of throw
c322f6b
to
7925adc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Failures in CI are entirely unrelated. |
These are internal only utility functions, CHECK instead of throw PR-URL: #16544 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Landed in 3d20190 |
setHiddenValue()
andgetHiddenValue()
are internal only utility functions, CHECK instead of throwChecklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
util