Commit 2d5380e
util: fix constructor/instanceof checks
These new checks are similar to the one introduced in 089d688,
but for other types of objects. Specifically, if an object was
created in a different context, the constructor object will not be
the same as the constructor object in the current context, so we
have to compare constructor names instead.
PR-URL: #3385
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>1 parent b9c6996 commit 2d5380eCopy full SHA for 2d5380e
File tree
Expand file treeCollapse file tree
2 files changed
+22
-8
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+22
-8
lines changedOpen diff view settings
Collapse file
+12-8Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
195 | 195 | |
196 | 196 | |
197 | 197 | |
| 198 | + |
198 | 199 | |
199 | 200 | |
200 | 201 | |
| ||
289 | 290 | |
290 | 291 | |
291 | 292 | |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
292 | 298 | |
293 | | - |
294 | | - |
295 | | - |
| 299 | + |
296 | 300 | |
297 | 301 | |
298 | 302 | |
299 | 303 | |
300 | 304 | |
301 | | - |
| 305 | + |
302 | 306 | |
303 | 307 | |
304 | 308 | |
| ||
307 | 311 | |
308 | 312 | |
309 | 313 | |
310 | | - |
| 314 | + |
311 | 315 | |
312 | 316 | |
313 | 317 | |
314 | 318 | |
315 | 319 | |
316 | 320 | |
317 | 321 | |
318 | | - |
319 | | - |
| 322 | + |
320 | 323 | |
321 | 324 | |
322 | 325 | |
| ||
332 | 335 | |
333 | 336 | |
334 | 337 | |
335 | | - |
| 338 | + |
| 339 | + |
336 | 340 | |
337 | 341 | |
338 | 342 | |
|
Collapse file
test/parallel/test-util-inspect.js
Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js+10Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
141 | 141 | |
142 | 142 | |
143 | 143 | |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
144 | 154 | |
145 | 155 | |
146 | 156 | |
|
0 commit comments