Commit b6e1d22
stream: add destroy and _destroy methods.
Adds destroy() and _destroy() methods to Readable, Writable, Duplex
and Transform. It also standardizes the behavior and the implementation
of destroy(), which has been inconsistent in userland and core.
This PR also updates all the subsystems of core to use the new
destroy().
PR-URL: #12925
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent f2e3a67 commit b6e1d22Copy full SHA for b6e1d22
File tree
Expand file treeCollapse file tree
18 files changed
+964
-68
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- internal
- process
- streams
- test
- parallel
- pseudo-tty
Expand file treeCollapse file tree
18 files changed
+964
-68
lines changedOpen diff view settings
Collapse file
+47-1Lines changed: 47 additions & 1 deletion
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
499 | 499 | |
500 | 500 | |
501 | 501 | |
| 502 | + |
| 503 | + |
| 504 | + |
| 505 | + |
| 506 | + |
| 507 | + |
| 508 | + |
| 509 | + |
| 510 | + |
502 | 511 | |
503 | 512 | |
504 | 513 | |
| ||
1070 | 1079 | |
1071 | 1080 | |
1072 | 1081 | |
| 1082 | + |
| 1083 | + |
| 1084 | + |
| 1085 | + |
| 1086 | + |
| 1087 | + |
| 1088 | + |
| 1089 | + |
| 1090 | + |
| 1091 | + |
1073 | 1092 | |
1074 | 1093 | |
1075 | 1094 | |
| ||
1109 | 1128 | |
1110 | 1129 | |
1111 | 1130 | |
| 1131 | + |
| 1132 | + |
| 1133 | + |
| 1134 | + |
| 1135 | + |
| 1136 | + |
| 1137 | + |
| 1138 | + |
| 1139 | + |
| 1140 | + |
1112 | 1141 | |
1113 | 1142 | |
1114 | 1143 | |
| ||
1248 | 1277 | |
1249 | 1278 | |
1250 | 1279 | |
| 1280 | + |
| 1281 | + |
1251 | 1282 | |
1252 | 1283 | |
1253 | 1284 | |
| ||
1358 | 1389 | |
1359 | 1390 | |
1360 | 1391 | |
| 1392 | + |
| 1393 | + |
| 1394 | + |
| 1395 | + |
| 1396 | + |
| 1397 | + |
| 1398 | + |
| 1399 | + |
| 1400 | + |
1361 | 1401 | |
1362 | 1402 | |
1363 | 1403 | |
| ||
1428 | 1468 | |
1429 | 1469 | |
1430 | 1470 | |
| 1471 | + |
| 1472 | + |
1431 | 1473 | |
1432 | 1474 | |
1433 | 1475 | |
| ||
2079 | 2121 | |
2080 | 2122 | |
2081 | 2123 | |
2082 | | - |
| 2124 | + |
| 2125 | + |
| 2126 | + |
| 2127 | + |
| 2128 | + |
Collapse file
+30Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
76 | 76 | |
77 | 77 | |
78 | 78 | |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
Collapse file
+38-2Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
30 | 30 | |
31 | 31 | |
32 | 32 | |
| 33 | + |
33 | 34 | |
34 | 35 | |
35 | 36 | |
| ||
99 | 100 | |
100 | 101 | |
101 | 102 | |
| 103 | + |
| 104 | + |
| 105 | + |
102 | 106 | |
103 | 107 | |
104 | 108 | |
| ||
129 | 133 | |
130 | 134 | |
131 | 135 | |
132 | | - |
133 | | - |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
134 | 143 | |
135 | 144 | |
136 | 145 | |
137 | 146 | |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
138 | 174 | |
139 | 175 | |
140 | 176 | |
|
Collapse file
+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
196 | 196 | |
197 | 197 | |
198 | 198 | |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
199 | 207 | |
200 | 208 | |
201 | 209 | |
|
Collapse file
+34Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
32 | 32 | |
33 | 33 | |
34 | 34 | |
| 35 | + |
35 | 36 | |
36 | 37 | |
37 | 38 | |
| ||
66 | 67 | |
67 | 68 | |
68 | 69 | |
| 70 | + |
| 71 | + |
| 72 | + |
69 | 73 | |
70 | 74 | |
71 | 75 | |
| ||
192 | 196 | |
193 | 197 | |
194 | 198 | |
| 199 | + |
| 200 | + |
| 201 | + |
195 | 202 | |
196 | 203 | |
197 | 204 | |
| ||
563 | 570 | |
564 | 571 | |
565 | 572 | |
| 573 | + |
| 574 | + |
| 575 | + |
| 576 | + |
| 577 | + |
| 578 | + |
| 579 | + |
| 580 | + |
| 581 | + |
| 582 | + |
| 583 | + |
| 584 | + |
| 585 | + |
| 586 | + |
| 587 | + |
| 588 | + |
| 589 | + |
| 590 | + |
| 591 | + |
| 592 | + |
| 593 | + |
| 594 | + |
| 595 | + |
| 596 | + |
| 597 | + |
| 598 | + |
| 599 | + |
Collapse file
+5-6Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1986 | 1986 | |
1987 | 1987 | |
1988 | 1988 | |
1989 | | - |
1990 | | - |
1991 | | - |
1992 | | - |
1993 | | - |
| 1989 | + |
| 1990 | + |
| 1991 | + |
| 1992 | + |
1994 | 1993 | |
1995 | 1994 | |
1996 | 1995 | |
| ||
2157 | 2156 | |
2158 | 2157 | |
2159 | 2158 | |
2160 | | - |
| 2159 | + |
2161 | 2160 | |
2162 | 2161 | |
2163 | 2162 | |
|
Collapse file
lib/internal/process/stdio.js
Copy file name to clipboardExpand all lines: lib/internal/process/stdio.js+8-4Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | | - |
| 21 | + |
| 22 | + |
| 23 | + |
22 | 24 | |
23 | 25 | |
24 | | - |
| 26 | + |
25 | 27 | |
26 | 28 | |
27 | 29 | |
| ||
32 | 34 | |
33 | 35 | |
34 | 36 | |
35 | | - |
| 37 | + |
| 38 | + |
| 39 | + |
36 | 40 | |
37 | 41 | |
38 | | - |
| 42 | + |
39 | 43 | |
40 | 44 | |
41 | 45 | |
|
Collapse file
lib/internal/streams/destroy.js
Copy file name to clipboard+65Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
0 commit comments