Commit 5a1289d
src: create env->inspector_console_api_object earlier
Previously we create env->inspector_console_api_object() when
`process.binding('inspector')` is called, which may be too late
if the inspector console is used before the first call to
`process.binding('inspector')` - that is possible when
using `--inspect-brk-node`. Setting a breakpoint and using the
inspector console before that would crash the process.
This patch moves the initialization of the console API object to
the point when Environment is initialized so that
`installAdditionalCommandLineAPI()` can be essentially a noop
if we use the inspector console before the inspector binding
is initialized instead of crashing on an empty object.
PR-URL: #24906
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>1 parent e61bbda commit 5a1289dCopy full SHA for 5a1289d
File tree
Expand file treeCollapse file tree
3 files changed
+8
-6
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
3 files changed
+8
-6
lines changedOpen diff view settings
Collapse file
+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
341 | 341 | |
342 | 342 | |
343 | 343 | |
| 344 | + |
| 345 | + |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
| 350 | + |
344 | 351 | |
345 | 352 | |
346 | 353 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
506 | 506 | |
507 | 507 | |
508 | 508 | |
| 509 | + |
509 | 510 | |
510 | 511 | |
511 | 512 | |
|
Collapse file
-6Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
277 | 277 | |
278 | 278 | |
279 | 279 | |
280 | | - |
281 | | - |
282 | | - |
283 | | - |
284 | | - |
285 | | - |
286 | 280 | |
287 | 281 | |
288 | 282 | |
|
0 commit comments