Commit 3c62b38
util: inspect objects with throwing Symbol.toStringTag
`util.inspect()` should handle all kinds of input, even if it is not well defined. Throwing is something that is meant to be worked around in all known cases. This fixes issues inspecting objects where accessing the Symbol.toStringTag would cause an error. The symbol is just ignored in that case. Refs: #55539 Refs: #55544 PR-URL: #59860 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 6133a82 commit 3c62b38
File tree
2 files changed
+14
-3
lines changed- lib/internal/util
- test/parallel
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
938 | | - | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
939 | 946 | | |
940 | 947 | | |
941 | 948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1646 | 1646 | | |
1647 | 1647 | | |
1648 | 1648 | | |
1649 | | - | |
| 1649 | + | |
1650 | 1650 | | |
1651 | 1651 | | |
1652 | 1652 | | |
| |||
1655 | 1655 | | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | | - | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
1659 | 1663 | | |
1660 | 1664 | | |
1661 | 1665 | | |
| |||
0 commit comments