Commit abc4cc2
src: refactor tickInfo access
- Wrap access to tickInfo fields in functions
- Rename `kHasScheduled` to `kHasTickScheduled` and
`kHasPromiseRejections` to `kHasRejectionToWarn` for clarity - note
the latter will be set to false if the rejection does not lead to
a warning so the previous description is not accurate.
- Set `kHasRejectionToWarn` in JS land of relying on C++ to use
an implict contract (return value of the promise rejection handler)
to set it, as the decision is made entirely in JS land.
- Destructure promise reject event constants.
PR-URL: #25200
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 5b1a987 commit abc4cc2Copy full SHA for abc4cc2
File tree
Expand file treeCollapse file tree
6 files changed
+63
-43
lines changedOpen diff view settings
Filter options
- lib/internal/process
- src
Expand file treeCollapse file tree
6 files changed
+63
-43
lines changedOpen diff view settings
Collapse file
lib/internal/process/next_tick.js
Copy file name to clipboardExpand all lines: lib/internal/process/next_tick.js+15-7Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
| 14 | + |
| 15 | + |
14 | 16 | |
15 | 17 | |
16 | 18 | |
| ||
30 | 32 | |
31 | 33 | |
32 | 34 | |
33 | | - |
34 | | - |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
35 | 43 | |
36 | 44 | |
37 | 45 | |
38 | 46 | |
39 | | - |
| 47 | + |
40 | 48 | |
41 | | - |
| 49 | + |
42 | 50 | |
43 | 51 | |
44 | 52 | |
| ||
70 | 78 | |
71 | 79 | |
72 | 80 | |
73 | | - |
| 81 | + |
74 | 82 | |
75 | 83 | |
76 | | - |
| 84 | + |
77 | 85 | |
78 | 86 | |
79 | 87 | |
| ||
119 | 127 | |
120 | 128 | |
121 | 129 | |
122 | | - |
| 130 | + |
123 | 131 | |
124 | 132 | |
125 | 133 | |
|
Collapse file
lib/internal/process/promises.js
Copy file name to clipboardExpand all lines: lib/internal/process/promises.js+36-12Lines changed: 36 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
6 | 12 | |
7 | 13 | |
| 14 | + |
| 15 | + |
| 16 | + |
8 | 17 | |
9 | 18 | |
10 | 19 | |
11 | 20 | |
12 | 21 | |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
13 | 30 | |
14 | 31 | |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
23 | 44 | |
24 | 45 | |
25 | 46 | |
| ||
38 | 59 | |
39 | 60 | |
40 | 61 | |
41 | | - |
| 62 | + |
42 | 63 | |
43 | 64 | |
44 | 65 | |
| ||
54 | 75 | |
55 | 76 | |
56 | 77 | |
57 | | - |
| 78 | + |
| 79 | + |
58 | 80 | |
59 | 81 | |
60 | | - |
| 82 | + |
61 | 83 | |
62 | 84 | |
63 | 85 | |
| ||
121 | 143 | |
122 | 144 | |
123 | 145 | |
| 146 | + |
| 147 | + |
124 | 148 | |
125 | 149 | |
126 | 150 | |
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
98 | | - |
| 98 | + |
99 | 99 | |
100 | 100 | |
101 | 101 | |
| ||
106 | 106 | |
107 | 107 | |
108 | 108 | |
109 | | - |
| 109 | + |
110 | 110 | |
111 | 111 | |
112 | 112 | |
|
Collapse file
+4-8Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
265 | 265 | |
266 | 266 | |
267 | 267 | |
268 | | - |
269 | | - |
| 268 | + |
| 269 | + |
270 | 270 | |
271 | 271 | |
272 | | - |
273 | | - |
274 | | - |
275 | | - |
276 | | - |
277 | | - |
| 272 | + |
| 273 | + |
278 | 274 | |
279 | 275 | |
280 | 276 | |
|
Collapse file
+4-6Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
572 | 572 | |
573 | 573 | |
574 | 574 | |
575 | | - |
576 | | - |
577 | | - |
578 | | - |
| 575 | + |
| 576 | + |
579 | 577 | |
580 | 578 | |
581 | 579 | |
582 | 580 | |
583 | 581 | |
584 | 582 | |
585 | | - |
586 | | - |
| 583 | + |
| 584 | + |
587 | 585 | |
588 | 586 | |
589 | 587 | |
|
Collapse file
+2-8Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
20 | | - |
21 | 20 | |
22 | 21 | |
23 | 22 | |
| ||
80 | 79 | |
81 | 80 | |
82 | 81 | |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
| 82 | + |
| 83 | + |
90 | 84 | |
91 | 85 | |
92 | 86 | |
|
0 commit comments