Commit 96283db
committed
prettyPrint: handle more cases in nested objects
GJS logs warnings if we pretty print an object containing null as a value. This is because a WeakSet cannot take in null values but null has typeof object.
GJS also does not print [GjsFileImporter root] objects if it is nested within another object, such as for imports.gi. This is because the logic on whether to call toString differs between prettyPrint and formatObject.
Guard explicitly against null and apply the same logic to formatObject as were in prettyPrint.1 parent 1c5d500 commit 96283db
File tree
2 files changed
+21
-7
lines changed- installed-tests/js
- modules/script/_bootstrap
2 files changed
+21
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
205 | 214 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
0 commit comments