You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reland fixes a leak in one of the tests caused by the test ending
before an AbortSignal.timeout() fired.
This is the second part of the AbortSignal.any() prototype; it
implements the memory management described in [1]. The idea is as
follows:
- A signal is "settled" if it can no longer emit events associated
with the composition type (abort or priority). For abort, this
means either the signal is aborted or it never will be; for
priority, this means the priority can no longer change. A signal
becomes settled if it aborts (for abort composition), if the
signal's associated controller has been GCed (implemented with a
prefinalizer), or if it's a composite signal and all of its parents
have been settled.
- Unsettled composite signals are kept alive as long as their effects
(active event listeners, abort/priority algorithms) can be
observed. This is implemented by making AbortSignal inherit from
LazyActiveScriptWrappable (only enabled for composite signals) and
determining activity based on settled state + active listeners and
algorithms. This allows AbortSignalCompositionManager to hold weak
references to all signals.
This also adds a number of wpt_internal/ tests using a finalization
registry to test signal lifetimes. The tests are mostly parameterized with an interface type so we can run these for TaskSignal as well
(follow-up).
[1] https://docs.google.com/document/d/1LvmsBLV85p-PhSGvTH-YwgD6onuhh1VXLg8jPlH32H4/edit?usp=sharing
Bug: 1323391
Change-Id: Ie5e3b283912693a2757ba188cef97b3a1182595e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4201001
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Scott Haseley <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1100760}
0 commit comments