DOM: Simplify Observable async iterable subscription
This CL slightly simplifies the Observable async iterable subscription
flow by moving the abort signal check *after* the null `ScriptIterator`
check. This has two effects:
1. Allows us to remove one call to `ClearAbortAlgorithm()`, since we
are assigning the abort algorithm handle *after* the null
`ScriptIterator` check, and that check is the last opportunity to
cancel the subscription
2. Brings the async iterable subscription path inline with the *sync*
subscription path, which is ordered similarly [1]
This has a very subtle behavior change, so this CL also adds a test for
this case. The spec will be updated accordingly.
[1]:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/observable.cc;l=1990-2019;drc=4b00956a8d971cf5ec8ec45a105b5dd8802d4a42
R=masonf
Bug: 363015168
Change-Id: Idf43bed901b1339d3581ce97c1cd02a0ac6b8b48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6199630
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1411976}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.