Commit 0fd6524
process: split routines used to enhance fatal exception stack traces
Previously the enhancement were done right after emitting
`'uncaughtException'`, which meant by the time we knew the
exception was fatal in C++, the error.stack had already been
patched.
This patch moves those routines to be called later during the
fatal exception handling, and split them into two stages:
before and after the inspector is notified by the invocation of
`V8Inspector::exceptionThrown`. We now expand the stack to include
additional informations about unhandled 'error' events before
the inspector is notified, but delay the highlighting of the
frames until after the inspector is notified, so that the
ANSI escape sequences won't show up in the inspector console.
PR-URL: #28308
Fixes: #28287
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent b744bd9 commit 0fd6524Copy full SHA for 0fd6524
File tree
Expand file treeCollapse file tree
10 files changed
+166
-55
lines changedOpen diff view settings
Filter options
- lib
- internal
- bootstrap
- process
- util
- src
Expand file treeCollapse file tree
10 files changed
+166
-55
lines changedOpen diff view settings
Collapse file
+8-5Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
28 | 32 | |
29 | 33 | |
30 | 34 | |
31 | 35 | |
32 | | - |
| 36 | + |
33 | 37 | |
34 | 38 | |
35 | 39 | |
| ||
142 | 146 | |
143 | 147 | |
144 | 148 | |
145 | | - |
146 | | - |
| 149 | + |
| 150 | + |
147 | 151 | |
148 | 152 | |
149 | 153 | |
| ||
162 | 166 | |
163 | 167 | |
164 | 168 | |
165 | | - |
166 | 169 | |
167 | 170 | |
168 | 171 | |
169 | | - |
| 172 | + |
170 | 173 | |
171 | 174 | |
172 | 175 | |
|
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js+15-2Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
299 | 299 | |
300 | 300 | |
301 | 301 | |
302 | | - |
303 | | - |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
| 306 | + |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | + |
| 311 | + |
| 312 | + |
| 313 | + |
| 314 | + |
304 | 315 | |
| 316 | + |
| 317 | + |
305 | 318 | |
306 | 319 | |
307 | 320 | |
|
Collapse file
+41Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
617 | 617 | |
618 | 618 | |
619 | 619 | |
| 620 | + |
| 621 | + |
| 622 | + |
| 623 | + |
| 624 | + |
| 625 | + |
| 626 | + |
| 627 | + |
| 628 | + |
| 629 | + |
| 630 | + |
| 631 | + |
| 632 | + |
| 633 | + |
| 634 | + |
| 635 | + |
| 636 | + |
| 637 | + |
| 638 | + |
| 639 | + |
| 640 | + |
| 641 | + |
| 642 | + |
| 643 | + |
| 644 | + |
| 645 | + |
| 646 | + |
| 647 | + |
| 648 | + |
| 649 | + |
| 650 | + |
| 651 | + |
| 652 | + |
| 653 | + |
| 654 | + |
| 655 | + |
| 656 | + |
| 657 | + |
| 658 | + |
620 | 659 | |
621 | 660 | |
622 | 661 | |
| ||
633 | 672 | |
634 | 673 | |
635 | 674 | |
| 675 | + |
| 676 | + |
636 | 677 | |
637 | 678 | |
638 | 679 | |
|
Collapse file
lib/internal/process/execution.js
Copy file name to clipboardExpand all lines: lib/internal/process/execution.js-12Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
150 | 150 | |
151 | 151 | |
152 | 152 | |
153 | | - |
154 | | - |
155 | | - |
156 | | - |
157 | 153 | |
158 | 154 | |
159 | 155 | |
| ||
163 | 159 | |
164 | 160 | |
165 | 161 | |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | | - |
172 | | - |
173 | | - |
174 | 162 | |
175 | 163 | |
176 | 164 | |
|
Collapse file
-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
414 | 414 | |
415 | 415 | |
416 | 416 | |
417 | | - |
418 | 417 | |
419 | 418 | |
Collapse file
lib/internal/util/inspect.js
Copy file name to clipboardExpand all lines: lib/internal/util/inspect.js+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1658 | 1658 | |
1659 | 1659 | |
1660 | 1660 | |
1661 | | - |
| 1661 | + |
| 1662 | + |
1662 | 1663 | |
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
386 | 386 | |
387 | 387 | |
388 | 388 | |
| 389 | + |
| 390 | + |
389 | 391 | |
390 | 392 | |
391 | 393 | |
|
Collapse file
+4-3Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
570 | 570 | |
571 | 571 | |
572 | 572 | |
573 | | - |
| 573 | + |
574 | 574 | |
575 | 575 | |
576 | 576 | |
| ||
836 | 836 | |
837 | 837 | |
838 | 838 | |
839 | | - |
| 839 | + |
| 840 | + |
840 | 841 | |
841 | 842 | |
842 | | - |
| 843 | + |
843 | 844 | |
844 | 845 | |
845 | 846 | |
|
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
65 | 65 | |
66 | 66 | |
67 | 67 | |
68 | | - |
69 | | - |
| 68 | + |
| 69 | + |
70 | 70 | |
71 | 71 | |
72 | 72 | |
|
0 commit comments