Skip to content

DOM: Implement finally() Observable operator#50885

Merged
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-5654720
Feb 21, 2025
Merged

DOM: Implement finally() Observable operator#50885
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-5654720

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 21, 2025

See WICG/observable#153. This CL implements the
finally() operator. It registers a callback which runs on both
producer-initiated and consumer-initiated unsubscription. Its
implementation is relatively straightforward, just utilizing the
relevant subscriber's teardown list.

This CL used to be really complicated, as was the spec PR. This has all
been simplified since the factors that made it complicated (and broken)
have been landed. See:

Now that the simplifying factors have been landed, this CL can proceed
with a simple implementation, which passes all of the tests.

R=dizhangg@chromium.org

Bug: 40282760
Change-Id: Ifff220ec094abd2187f35020eae85c1bca502f89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5654720
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1423349}

See WICG/observable#153. This CL implements the
`finally()` operator. It registers a callback which runs on both
producer-initiated and consumer-initiated unsubscription. Its
implementation is relatively straightforward, just utilizing the
relevant subscriber's teardown list.

This CL used to be really complicated, as was the spec PR. This has all
been simplified since the factors that made it complicated (and broken)
have been landed. See:
 - WICG/observable#151 (comment)
 - WICG/observable#154
 - https://crrev.com/c/5676226

Now that the simplifying factors have been landed, this CL can proceed
with a simple implementation, which passes all of the tests.

R=dizhangg@chromium.org

Bug: 40282760
Change-Id: Ifff220ec094abd2187f35020eae85c1bca502f89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5654720
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1423349}
Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 12acca9 into master Feb 21, 2025
15 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-5654720 branch February 21, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants