Commit d8ab4e1
util: optimize promise introspection
Use V8's builtin ObjectIsPromise() to check that the value is a promise
before creating the promise mirror. Reduces garbage collector strain
in the (common) non-promise case, which is beneficial when inspecting
deep object graphs.
PR-URL: #3130
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>1 parent a0b35bf commit d8ab4e1Copy full SHA for d8ab4e1
File tree
Expand file treeCollapse file tree
1 file changed
+15
-3
lines changedOpen diff view settings
Filter options
- lib
Expand file treeCollapse file tree
1 file changed
+15
-3
lines changedOpen diff view settings
Collapse file
+15-3Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
6 | 7 | |
| 8 | + |
7 | 9 | |
8 | 10 | |
9 | 11 | |
| ||
183 | 185 | |
184 | 186 | |
185 | 187 | |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
186 | 198 | |
187 | | - |
188 | | - |
189 | | - |
| 199 | + |
| 200 | + |
190 | 201 | |
| 202 | + |
191 | 203 | |
192 | 204 | |
193 | 205 | |
|
0 commit comments