Commit 6930205
events: remove abort listener from signal in
the `abortHandler` function is declared within the scope of
the `events.on` function so cannot be removed by the caller
which can lead to a memory leak
adding the abort listener using the `addAbortListener` helper
returns a disposable that can be used to clean up the listener
when the iterator is exited
Fixes: #51010
PR-URL: #51091
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>on
1 parent 5a92223 commit 6930205
2 files changed
+35
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
| 1167 | + | |
| 1168 | + | |
1175 | 1169 | | |
1176 | 1170 | | |
1177 | 1171 | | |
| |||
1198 | 1192 | | |
1199 | 1193 | | |
1200 | 1194 | | |
| 1195 | + | |
1201 | 1196 | | |
1202 | 1197 | | |
1203 | 1198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
366 | 397 | | |
367 | 398 | | |
368 | 399 | | |
| |||
382 | 413 | | |
383 | 414 | | |
384 | 415 | | |
| 416 | + | |
385 | 417 | | |
386 | 418 | | |
387 | 419 | | |
| |||
0 commit comments