Uh oh!
There was an error while loading. Please reload this page.
util: harden util.inspect - #21869
Conversation
This makes sure values without prototype will still be inspected properly and do not cause errors. It restores the original information if possible. Besides that it fixes an issue with boxed symbols: extra keys were not visualized so far.
devsnek
left a comment
There was a problem hiding this comment.
might wanna use uncurryThis instead of .call
BridgeAR
commented
Jul 27, 2018
PTAL. It would be nice to get another LG. @devsnek are you also fine with landing it as is? |
| } | ||
| } else if (isWeakMap(value)) { | ||
| braces[0] = `${getPrefix(constructor, tag)}{`; | ||
| braces[0] = `${getPrefix(constructor, tag) || 'WeakMap '}{`; |
There was a problem hiding this comment.
Would it make more sense to make the || 'thing ' be a param of getPrefix to add the trailing space then?
BridgeAR
commented
Jul 27, 2018
I addressed both comments. |
BridgeAR
commented
Jul 27, 2018
Landed in 10c850b 🎉 |
This makes sure values without prototype will still be inspected properly and do not cause errors. It restores the original information if possible. Besides that it fixes an issue with boxed symbols: extra keys were not visualized so far. PR-URL: nodejs#21869 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
targos
commented
Jul 31, 2018
targos
commented
Aug 19, 2018
#20961 landed and I was able to cherry-pick this with just a trivial conflict to fix. |
This makes sure values without prototype will still be inspected properly and do not cause errors. It restores the original information if possible. Besides that it fixes an issue with boxed symbols: extra keys were not visualized so far. PR-URL: #21869 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
BridgeAR
commented
Aug 24, 2018
@targos seems like this did not yet land in any release. I would like to pull this out until #22437 landed. In that case both could land together. Otherwise the latter would be semver-major as I remove support for the Symbol.manipulation again. It is just difficult to deal with that properly all at once. |
targos
commented
Aug 24, 2018
BridgeAR
commented
Aug 24, 2018
@targos yes, awesome. Thanks a lot. |
This makes sure values without prototype will still be inspected properly and do not cause errors. It restores the original information if possible. Besides that it fixes an issue with boxed symbols: extra keys were not visualized so far. PR-URL: #21869 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
This makes sure values without prototype will still be inspected
properly and do not cause errors. It restores the original
information if possible.
Besides that it fixes an issue with boxed symbols: extra keys were
not visualized so far.
The main focus here is correctness and performance. I am not always happy with the code but it is not always easy to "fix" these things. I could not find a fix for e.g. regular expressions and if someone has an idea, please let me know!
Fixes#19511
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes