Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use AbortSignal::Follow in fetch and cache-storage
AbortSignal's "follow" algorithm is replaced with a new algorithm for creating a dependent abort signal ([1], [2]), which is implemented as a new AbortSignal constructor. This CL replaces Follow with the new ctor, behind the AbortSignalAny REF. There is a slight compat risk with the change (when the feature ships): 1. fetch: abort is propagated to dependent signals after abort event dispatch for a signal, whereas "follow" propagated abort before (as abort algorithms), which is observable. We could alternatively use weak abort algorithms in AbortSignal.any(), but that would be more complicated and partially limit GC optimizations. 2. cache: The use of "follow" in cache.addAll was not specced and could lead to abort events firing when they shouldn't have. The new behavior preserves the specced behavior (aborting outstanding requests on failure) without dispatching events when abort is triggered internally. Note: the virtual test expectations match the current expectations except for the test modified in fetch/api/abort/general.any.js. [1] whatwg/dom#1152 [2] whatwg/fetch#1646 Bug: 1323391 Low-Coverage-Reason: the uncovered lines in request.cc are covered by WPT tests Change-Id: I5c25048fcf9f8db759e2f0181ac338c8b603b451 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4515276 Reviewed-by: Nidhi Jaju <nidhijaju@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Scott Haseley <shaseley@chromium.org> Reviewed-by: Ben Kelly <wanderview@chromium.org> Cr-Commit-Position: refs/heads/main@{#1144953}
- Loading branch information