Commit 23119ca
inspector: supported NodeRuntime domain in worker
NodeRuntime domain was introduced to give inspector client way to
fetch captured information before Node process is gone. We need
similar capability for work.
With current protocol inspector client can force worker to wait
on start by passing waitForDebuggerOnStart flag to NodeWorker.enable
method. So client has some time to setup environment, e.g. start
profiler. At the same time there is no way to prevent worker from
being terminated. So we can start capturing profile but we can not
reliably get captured data back.
This PR implemented NodeRuntime.notifyWhenWaitingForDisconnect
method for worker. When NodeRuntime.waitingForDisconnect notification
is enabled, worker will wait for explicit NodeWorker.detach call.
With this PR worker tooling story is nicely aligned with main thread
tooling story. The only difference is that main thread by default is
waiting for disconnect but worker thread is not waiting.
Issue: #27677
PR-URL: #27706
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>1 parent 6a5ce36 commit 23119caCopy full SHA for 23119ca
File tree
Expand file treeCollapse file tree
6 files changed
+70
-10
lines changedOpen diff view settings
Filter options
- src
- inspector
- test/parallel
Expand file treeCollapse file tree
6 files changed
+70
-10
lines changedOpen diff view settings
Collapse file
src/inspector/node_protocol.pdl
Copy file name to clipboardExpand all lines: src/inspector/node_protocol.pdl+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
71 | 71 | |
72 | 72 | |
73 | 73 | |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
74 | 79 | |
75 | 80 | |
76 | 81 | |
|
Collapse file
src/inspector/runtime_agent.cc
Copy file name to clipboardExpand all lines: src/inspector/runtime_agent.cc-4Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
16 | 16 | |
17 | 17 | |
18 | 18 | |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | 19 | |
24 | 20 | |
25 | 21 | |
|
Collapse file
src/inspector/worker_agent.cc
Copy file name to clipboardExpand all lines: src/inspector/worker_agent.cc+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
115 | 115 | |
116 | 116 | |
117 | 117 | |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
118 | 123 | |
119 | 124 | |
120 | 125 | |
|
Collapse file
src/inspector/worker_agent.h
Copy file name to clipboardExpand all lines: src/inspector/worker_agent.h+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
| 28 | + |
28 | 29 | |
29 | 30 | |
30 | 31 | |
|
Collapse file
+12-6Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
472 | 472 | |
473 | 473 | |
474 | 474 | |
475 | | - |
476 | | - |
| 475 | + |
| 476 | + |
477 | 477 | |
478 | 478 | |
479 | 479 | |
| ||
548 | 548 | |
549 | 549 | |
550 | 550 | |
| 551 | + |
| 552 | + |
551 | 553 | |
552 | 554 | |
553 | 555 | |
| ||
678 | 680 | |
679 | 681 | |
680 | 682 | |
681 | | - |
| 683 | + |
682 | 684 | |
| 685 | + |
683 | 686 | |
684 | 687 | |
685 | 688 | |
| ||
723 | 726 | |
724 | 727 | |
725 | 728 | |
726 | | - |
| 729 | + |
727 | 730 | |
728 | 731 | |
729 | 732 | |
| ||
819 | 822 | |
820 | 823 | |
821 | 824 | |
822 | | - |
| 825 | + |
823 | 826 | |
| 827 | + |
| 828 | + |
| 829 | + |
824 | 830 | |
825 | 831 | |
826 | | - |
| 832 | + |
827 | 833 | |
828 | 834 | |
829 | 835 | |
|
Collapse file
test/parallel/test-worker-debug.js
Copy file name to clipboardExpand all lines: test/parallel/test-worker-debug.js+47Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
206 | 206 | |
207 | 207 | |
208 | 208 | |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
209 | 255 | |
210 | 256 | |
211 | 257 | |
| ||
219 | 265 | |
220 | 266 | |
221 | 267 | |
| 268 | + |
222 | 269 | |
223 | 270 | |
224 | 271 | |
|
0 commit comments