Commit 56b2a72
inspector: split the HostPort being used and the one parsed from CLI
Instead of using a shared pointer of the entire debug option set,
pass the parsed debug option to inspector classes by value because
they are set once the CLI argument parsing is done. Add another shared
pointer to HostPort being used by the inspector server, which is copied
from the one in the debug options initially. The port of the shared
HostPort is 9229 by default and can be specified as 0 initially but
will be set to the actual port of the server once it starts listening.
This makes the shared state clearer and makes it possible to use
`require('internal/options')` in JS land to query the CLI options
instead of using `process._breakFirstLine` and other underscored
properties of `process` since we are now certain that these
values should not be altered once the parsing is done and can be
passed around in copies without locks.
PR-URL: #24772
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent 81dce68 commit 56b2a72Copy full SHA for 56b2a72
File tree
Expand file treeCollapse file tree
15 files changed
+160
-98
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
15 files changed
+160
-98
lines changedOpen diff view settings
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
585 | 585 | |
586 | 586 | |
587 | 587 | |
| 588 | + |
| 589 | + |
| 590 | + |
| 591 | + |
588 | 592 | |
589 | 593 | |
590 | 594 | |
|
Collapse file
+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5 | 5 | |
6 | 6 | |
7 | 7 | |
| 8 | + |
8 | 9 | |
9 | 10 | |
10 | 11 | |
| ||
192 | 193 | |
193 | 194 | |
194 | 195 | |
195 | | - |
| 196 | + |
196 | 197 | |
197 | 198 | |
198 | 199 | |
|
Collapse file
+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
911 | 911 | |
912 | 912 | |
913 | 913 | |
| 914 | + |
914 | 915 | |
915 | 916 | |
916 | 917 | |
| ||
942 | 943 | |
943 | 944 | |
944 | 945 | |
| 946 | + |
| 947 | + |
| 948 | + |
| 949 | + |
| 950 | + |
| 951 | + |
| 952 | + |
| 953 | + |
945 | 954 | |
946 | 955 | |
947 | 956 | |
|
Collapse file
+17-12Lines changed: 17 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
669 | 669 | |
670 | 670 | |
671 | 671 | |
672 | | - |
673 | | - |
| 672 | + |
| 673 | + |
| 674 | + |
674 | 675 | |
675 | 676 | |
676 | 677 | |
| ||
681 | 682 | |
682 | 683 | |
683 | 684 | |
684 | | - |
| 685 | + |
| 686 | + |
685 | 687 | |
686 | | - |
687 | | - |
688 | | - |
689 | 688 | |
690 | 689 | |
| 690 | + |
| 691 | + |
| 692 | + |
691 | 693 | |
692 | 694 | |
693 | 695 | |
| ||
699 | 701 | |
700 | 702 | |
701 | 703 | |
702 | | - |
| 704 | + |
703 | 705 | |
704 | 706 | |
705 | 707 | |
706 | | - |
| 708 | + |
707 | 709 | |
708 | 710 | |
| 711 | + |
| 712 | + |
| 713 | + |
| 714 | + |
| 715 | + |
709 | 716 | |
710 | 717 | |
711 | 718 | |
| ||
725 | 732 | |
726 | 733 | |
727 | 734 | |
728 | | - |
729 | | - |
| 735 | + |
730 | 736 | |
731 | 737 | |
732 | 738 | |
| ||
867 | 873 | |
868 | 874 | |
869 | 875 | |
870 | | - |
871 | | - |
| 876 | + |
872 | 877 | |
873 | 878 | |
874 | 879 | |
|
Collapse file
+13-5Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
| 14 | + |
15 | 15 | |
16 | 16 | |
17 | 17 | |
| ||
50 | 50 | |
51 | 51 | |
52 | 52 | |
53 | | - |
54 | | - |
| 53 | + |
| 54 | + |
| 55 | + |
55 | 56 | |
56 | 57 | |
57 | 58 | |
| ||
104 | 105 | |
105 | 106 | |
106 | 107 | |
107 | | - |
| 108 | + |
| 109 | + |
108 | 110 | |
109 | 111 | |
110 | 112 | |
| ||
121 | 123 | |
122 | 124 | |
123 | 125 | |
124 | | - |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
125 | 133 | |
126 | 134 | |
127 | 135 | |
|
Collapse file
+13-9Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
242 | 242 | |
243 | 243 | |
244 | 244 | |
245 | | - |
| 245 | + |
246 | 246 | |
247 | | - |
| 247 | + |
248 | 248 | |
249 | 249 | |
250 | 250 | |
| ||
253 | 253 | |
254 | 254 | |
255 | 255 | |
256 | | - |
257 | | - |
258 | | - |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
259 | 262 | |
260 | 263 | |
261 | 264 | |
| ||
287 | 290 | |
288 | 291 | |
289 | 292 | |
290 | | - |
291 | | - |
292 | | - |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
293 | 297 | |
294 | 298 | |
295 | 299 | |
296 | 300 | |
297 | 301 | |
298 | 302 | |
299 | | - |
| 303 | + |
300 | 304 | |
301 | 305 | |
302 | 306 | |
|
Collapse file
+7-7Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
46 | 46 | |
47 | 47 | |
48 | 48 | |
49 | | - |
50 | | - |
| 49 | + |
| 50 | + |
| 51 | + |
51 | 52 | |
52 | 53 | |
53 | 54 | |
54 | 55 | |
55 | 56 | |
56 | | - |
57 | | - |
| 57 | + |
| 58 | + |
58 | 59 | |
59 | 60 | |
60 | 61 | |
61 | 62 | |
62 | 63 | |
63 | | - |
| 64 | + |
64 | 65 | |
65 | 66 | |
66 | 67 | |
| ||
74 | 75 | |
75 | 76 | |
76 | 77 | |
77 | | - |
| 78 | + |
78 | 79 | |
79 | 80 | |
80 | 81 | |
| ||
84 | 85 | |
85 | 86 | |
86 | 87 | |
87 | | - |
88 | 88 | |
89 | 89 | |
90 | 90 | |
|
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
243 | 243 | |
244 | 244 | |
245 | 245 | |
246 | | - |
| 246 | + |
247 | 247 | |
248 | 248 | |
249 | 249 | |
250 | 250 | |
251 | | - |
| 251 | + |
252 | 252 | |
253 | 253 | |
254 | 254 | |
|
Collapse file
+16-16Lines changed: 16 additions & 16 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
27 | 27 | |
28 | 28 | |
29 | 29 | |
| 30 | + |
30 | 31 | |
31 | 32 | |
32 | 33 | |
| ||
259 | 260 | |
260 | 261 | |
261 | 262 | |
262 | | - |
263 | | - |
| 263 | + |
264 | 264 | |
265 | 265 | |
266 | 266 | |
267 | 267 | |
268 | | - |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
269 | 272 | |
270 | 273 | |
271 | 274 | |
| ||
306 | 309 | |
307 | 310 | |
308 | 311 | |
309 | | - |
310 | | - |
| 312 | + |
311 | 313 | |
312 | 314 | |
313 | 315 | |
| ||
1127 | 1129 | |
1128 | 1130 | |
1129 | 1131 | |
1130 | | - |
| 1132 | + |
1131 | 1133 | |
1132 | 1134 | |
1133 | 1135 | |
1134 | 1136 | |
1135 | | - |
| 1137 | + |
1136 | 1138 | |
1137 | 1139 | |
1138 | 1140 | |
1139 | 1141 | |
1140 | 1142 | |
1141 | | - |
| 1143 | + |
1142 | 1144 | |
1143 | 1145 | |
1144 | 1146 | |
1145 | 1147 | |
1146 | 1148 | |
1147 | | - |
| 1149 | + |
1148 | 1150 | |
1149 | 1151 | |
1150 | 1152 | |
| ||
1356 | 1358 | |
1357 | 1359 | |
1358 | 1360 | |
1359 | | - |
| 1361 | + |
1360 | 1362 | |
1361 | 1363 | |
1362 | 1364 | |
| ||
1390 | 1392 | |
1391 | 1393 | |
1392 | 1394 | |
1393 | | - |
1394 | | - |
1395 | | - |
| 1395 | + |
1396 | 1396 | |
1397 | 1397 | |
1398 | | - |
| 1398 | + |
1399 | 1399 | |
1400 | 1400 | |
1401 | 1401 | |
| ||
2038 | 2038 | |
2039 | 2039 | |
2040 | 2040 | |
2041 | | - |
| 2041 | + |
2042 | 2042 | |
2043 | | - |
| 2043 | + |
2044 | 2044 | |
2045 | 2045 | |
2046 | 2046 | |
|
0 commit comments