angular/packages/zone.js/lib/common
arturovt a9460d08a0 fix(zone.js): remove abort listener on a signal when actual event is removed (#55339)
This commit updates the implementation of the `addEventListener` patcher.

We're currently creating an abort event listener on the signal (when it's provided)
and never remove it. The abort event listener creates a closure which captures `task`
(tasks capture zones and other stuff too) and prevent `task`, zones and signals from
being garbage collected.

We now store the function which removes the abort event listener when the actual event
listener is being removed. The function is stored on task data since task data is already
being used to store different types of information that's necessary to be shared between
`addEventListener` and `removeEventListener`.

Closes #54739

PR Close #55339
2024-05-07 08:07:33 -07:00
..
error-rewrite.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:05 -07:00
events.ts fix(zone.js): remove abort listener on a signal when actual event is removed (#55339) 2024-05-07 08:07:33 -07:00
fetch.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:05 -07:00
promise.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:05 -07:00
queue-microtask.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:05 -07:00
rollup-error-rewrite.ts refactor(zone.js): update Zone bundles to call patch* functions (#53443) 2024-03-15 18:11:33 -07:00
rollup-fetch.ts refactor(zone.js): update Zone bundles to call patch* functions (#53443) 2024-03-15 18:11:33 -07:00
timers.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:05 -07:00
to-string.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:05 -07:00
utils.ts refactor(zone.js): use Object.prototype.toString directly for improved tree shakability (#55412) 2024-04-30 14:06:43 -07:00