Repository navigation
Commit b03f41d
committed
lib: format default abort reason stack eagerly
The default AbortError created by AbortController.prototype.abort()
and AbortSignal.abort() keeps its stack unformatted. Until it is
formatted, V8 holds on to the call sites, which retain the receivers
and functions of the calling frames. A signal that outlives the work
it cancelled can then keep that work alive, including large buffers.
Read the stack once when the default reason is created, as streams
already do. Reasons passed by the caller are left untouched.
Signed-off-by: Kuldeep Yadav <kuldeeep.yadav1@gmail.com>1 parent e7d8ab5 commit b03f41d
2 files changed
Lines changed: 63 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
219 | 233 | | |
220 | 234 | | |
221 | 235 | | |
| |||
293 | 307 | | |
294 | 308 | | |
295 | 309 | | |
296 | | - | |
297 | | - | |
| 310 | + | |
298 | 311 | | |
299 | 312 | | |
300 | 313 | | |
| |||
576 | 589 | | |
577 | 590 | | |
578 | 591 | | |
579 | | - | |
| 592 | + | |
580 | 593 | | |
581 | 594 | | |
582 | 595 | | |
| |||
| 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 | + | |
0 commit comments