Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec ref-counted producers #197

Merged
merged 5 commits into from
Feb 21, 2025
Merged

Spec ref-counted producers #197

merged 5 commits into from
Feb 21, 2025

Conversation

domfarolino
Copy link
Collaborator

@domfarolino domfarolino commented Feb 6, 2025

Closes #170. Closes #178.

Corresponding Chromium change and tests: https://chromium-review.googlesource.com/c/chromium/src/+/6221901.


Preview | Diff

@domfarolino domfarolino force-pushed the spec-refcounted-producers branch from 4f4b4ab to 9a61a87 Compare February 7, 2025 20:00
@domfarolino domfarolino force-pushed the spec-refcounted-producers branch from 9a61a87 to a46bb3e Compare February 7, 2025 21:58
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2025
This CL implements ref-counted producers, which came out of the W3C
TPAC discussions in 2024. After this CL, multiple
`ObservableInternalObserver` objects can be associated/registered with
a single active `Subscriber`. The main meat of this CL involves the
logic managing consumer unsubscription, to ensure that only once *all*
associated consumers/observers unsubscribe do we actually close down
a `Subscriber`.

See WICG/observable#197.

R=masonf

Bug: 363015168
Change-Id: I67b63a3f4e38bf5be0236fd1b8f025648a3089bf
aarongable pushed a commit to chromium/chromium that referenced this pull request Feb 14, 2025
This CL implements ref-counted producers, which came out of the W3C
TPAC discussions in 2024. After this CL, multiple
`ObservableInternalObserver` objects can be associated/registered with
a single active `Subscriber`. The main meat of this CL involves the
logic managing consumer unsubscription, to ensure that only once *all*
associated consumers/observers unsubscribe do we actually close down
a `Subscriber`.

See WICG/observable#197.

R=masonf

Bug: 363015168
Change-Id: I67b63a3f4e38bf5be0236fd1b8f025648a3089bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221901
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1420647}
@domfarolino domfarolino requested a review from benlesh February 14, 2025 20:24
@domfarolino domfarolino marked this pull request as ready for review February 14, 2025 20:24
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2025
This CL implements ref-counted producers, which came out of the W3C
TPAC discussions in 2024. After this CL, multiple
`ObservableInternalObserver` objects can be associated/registered with
a single active `Subscriber`. The main meat of this CL involves the
logic managing consumer unsubscription, to ensure that only once *all*
associated consumers/observers unsubscribe do we actually close down
a `Subscriber`.

See WICG/observable#197.

R=masonf

Bug: 363015168
Change-Id: I67b63a3f4e38bf5be0236fd1b8f025648a3089bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221901
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1420647}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2025
This CL implements ref-counted producers, which came out of the W3C
TPAC discussions in 2024. After this CL, multiple
`ObservableInternalObserver` objects can be associated/registered with
a single active `Subscriber`. The main meat of this CL involves the
logic managing consumer unsubscription, to ensure that only once *all*
associated consumers/observers unsubscribe do we actually close down
a `Subscriber`.

See WICG/observable#197.

R=masonf

Bug: 363015168
Change-Id: I67b63a3f4e38bf5be0236fd1b8f025648a3089bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221901
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1420647}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 18, 2025
…oducer, a=testonly

Automatic update from web-platform-tests
DOM: Implement ref-counted Observable producer

This CL implements ref-counted producers, which came out of the W3C
TPAC discussions in 2024. After this CL, multiple
`ObservableInternalObserver` objects can be associated/registered with
a single active `Subscriber`. The main meat of this CL involves the
logic managing consumer unsubscription, to ensure that only once *all*
associated consumers/observers unsubscribe do we actually close down
a `Subscriber`.

See WICG/observable#197.

R=masonf

Bug: 363015168
Change-Id: I67b63a3f4e38bf5be0236fd1b8f025648a3089bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221901
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1420647}

--

wpt-commits: 976ac8e83a9197bf3153d902435aea5620da8df6
wpt-pr: 50723
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Feb 19, 2025
…oducer, a=testonly

Automatic update from web-platform-tests
DOM: Implement ref-counted Observable producer

This CL implements ref-counted producers, which came out of the W3C
TPAC discussions in 2024. After this CL, multiple
`ObservableInternalObserver` objects can be associated/registered with
a single active `Subscriber`. The main meat of this CL involves the
logic managing consumer unsubscription, to ensure that only once *all*
associated consumers/observers unsubscribe do we actually close down
a `Subscriber`.

See WICG/observable#197.

R=masonf

Bug: 363015168
Change-Id: I67b63a3f4e38bf5be0236fd1b8f025648a3089bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221901
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1420647}

--

wpt-commits: 976ac8e83a9197bf3153d902435aea5620da8df6
wpt-pr: 50723
@domfarolino domfarolino merged commit a091c5a into master Feb 21, 2025
2 checks passed
@domfarolino domfarolino deleted the spec-refcounted-producers branch February 21, 2025 02:28
github-actions bot added a commit that referenced this pull request Feb 21, 2025
SHA: a091c5a
Reason: push, by domfarolino

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
aarongable pushed a commit to chromium/chromium that referenced this pull request Feb 21, 2025
This CL puts the ref-counted producer implementation of Observables in
sync with the latest spec changes, as per discussion in
WICG/observable#197 (comment).

Essentially, the Observable should not own its most recent active
Subscriber, and a Subscriber kept alive by JavaScript should not keep
its associated Observable alive if it is no longer referenced by script.

This CL ensures these garbage collection semantics are tested too.

R=masonf

Bug: 40282760
Change-Id: I6579f5a5c95557f686d078c0aef7094b8e216066
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6287812
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1423285}
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Feb 25, 2025
…oducer, a=testonly

Automatic update from web-platform-tests
DOM: Implement ref-counted Observable producer

This CL implements ref-counted producers, which came out of the W3C
TPAC discussions in 2024. After this CL, multiple
`ObservableInternalObserver` objects can be associated/registered with
a single active `Subscriber`. The main meat of this CL involves the
logic managing consumer unsubscription, to ensure that only once *all*
associated consumers/observers unsubscribe do we actually close down
a `Subscriber`.

See WICG/observable#197.

R=masonf

Bug: 363015168
Change-Id: I67b63a3f4e38bf5be0236fd1b8f025648a3089bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221901
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1420647}

--

wpt-commits: 976ac8e83a9197bf3153d902435aea5620da8df6
wpt-pr: 50723
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ref Counted Observable discussion Reconsider unpredictable hot/cold and async/sync behavior
2 participants