Closed Bug 1865350 Opened 8 months ago Closed 7 months ago

[wpt-sync] Sync PR 43233 - Observable: Implement signal aborting to prep for teardown

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 43233 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/43233
Details from upstream follow.

Dominic Farolino <dom@chromium.org> wrote:

Observable: Implement signal aborting to prep for teardown

Before this CL, Subscriber#signal is a dependent signal based
exclusively on Observer#signal, if it exists. This means that while
calling Subscriber#complete() or Subscriber#error() would "close"
the subscription (making .active false), but would not abort its
signal.

After this CL, Subscriber#signal is a dependent signal based on two
source signals:

  1. Observer#signal
  2. A new signal that gets aborted when complete() and error() are
    called

In response to Subscriber::signal_ being aborted, the abort algorithm
runs which just calls Subscriber::CloseSubscription() (which might
have already been called by this point, if we aborted due to
a complete() or error() call.

This CL also properly handles the case where Observer#signal is
already aborted. Previously, we would not synchronously close down the
subscription, but this CL ensures that we do (see the deleted test
expectations).

This CL is mostly doing preparation for work the addTeardown() method
which is used to register teardown callbacks which run as
Subscriber#signal gets aborted.

R=masonf@chromium.org

Bug: 1485981
Change-Id: Ib01eee42a99b8c778e873d38bb76a0c88ca7cfd8

Reviewed-on: https://chromium-review.googlesource.com/5038395
WPT-Export-Revision: 6f6098b1643df6605a553b6642d5357f98b4b5b5

PR 43233 applied with additional changes from upstream: d55f8950735132e1613d500b0ffe380597e1436e, 03d5b9b63f0cdc0c89f5443a53b45712ad33a552, 5505353a891869275c8da6cf52f129a2befabf33
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 25 subtests

Status Summary

Firefox

OK : 2
FAIL: 50

Chrome

OK : 2
PASS: 46
FAIL: 4

Safari

OK : 2
FAIL: 50

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /dom/observable/tentative/observable-constructor.any.worker.html [wpt.fyi]
    • Observable constructor: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscriber interface is not constructible: FAIL (Chrome: PASS, Safari: FAIL)
    • subscribe() can be called with no arguments: FAIL (Chrome: PASS, Safari: FAIL)
    • Observable constructor calls initializer on subscribe: FAIL (Chrome: PASS, Safari: FAIL)
    • Observable error path called synchronously: FAIL (Chrome: PASS, Safari: FAIL)
    • Observable should error if initializer throws: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription is inactive after complete(): FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription is inactive after error(): FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription is inactive when aborted signal is passed in: FAIL (Chrome: FAIL, Safari: FAIL)
    • Subscriber#signal is not the same AbortSignal as the one passed into subscribe(): FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription does not emit values after completion: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription does not emit values after error: FAIL (Chrome: PASS, Safari: FAIL)
    • Completing or nexting a subscriber after an error does nothing: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors pushed to the subscriber that are not handled by the subscription are reported to the global: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors thrown in the initializer that are not handled by the subscription are reported to the global: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription reports errors that are pushed after subscriber is closed by completion: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors thrown by initializer function after subscriber is closed by completion are reported: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors thrown by initializer function after subscriber is closed by error are reported: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors pushed by initializer function after subscriber is closed by error are reported: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscriber#complete() cannot re-entrantly invoke itself: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscriber#error() cannot re-entrantly invoke itself: FAIL (Chrome: PASS, Safari: FAIL)
    • Unsubscription lifecycle: FAIL (Chrome: FAIL, Safari: FAIL)
    • Aborting a subscription should stop emitting values: FAIL (Chrome: PASS, Safari: FAIL)
    • Calling subscribe should never throw an error synchronously, initializer throws error: FAIL (Chrome: PASS, Safari: FAIL)
    • Calling subscribe should never throw an error synchronously, subscriber pushes error: FAIL (Chrome: PASS, Safari: FAIL)
  • /dom/observable/tentative/observable-constructor.any.html [wpt.fyi]
    • Observable constructor: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscriber interface is not constructible: FAIL (Chrome: PASS, Safari: FAIL)
    • subscribe() can be called with no arguments: FAIL (Chrome: PASS, Safari: FAIL)
    • Observable constructor calls initializer on subscribe: FAIL (Chrome: PASS, Safari: FAIL)
    • Observable error path called synchronously: FAIL (Chrome: PASS, Safari: FAIL)
    • Observable should error if initializer throws: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription is inactive after complete(): FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription is inactive after error(): FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription is inactive when aborted signal is passed in: FAIL (Chrome: FAIL, Safari: FAIL)
    • Subscriber#signal is not the same AbortSignal as the one passed into subscribe(): FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription does not emit values after completion: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription does not emit values after error: FAIL (Chrome: PASS, Safari: FAIL)
    • Completing or nexting a subscriber after an error does nothing: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors pushed to the subscriber that are not handled by the subscription are reported to the global: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors thrown in the initializer that are not handled by the subscription are reported to the global: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscription reports errors that are pushed after subscriber is closed by completion: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors thrown by initializer function after subscriber is closed by completion are reported: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors thrown by initializer function after subscriber is closed by error are reported: FAIL (Chrome: PASS, Safari: FAIL)
    • Errors pushed by initializer function after subscriber is closed by error are reported: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscriber#complete() cannot re-entrantly invoke itself: FAIL (Chrome: PASS, Safari: FAIL)
    • Subscriber#error() cannot re-entrantly invoke itself: FAIL (Chrome: PASS, Safari: FAIL)
    • Unsubscription lifecycle: FAIL (Chrome: FAIL, Safari: FAIL)
    • Aborting a subscription should stop emitting values: FAIL (Chrome: PASS, Safari: FAIL)
    • Calling subscribe should never throw an error synchronously, initializer throws error: FAIL (Chrome: PASS, Safari: FAIL)
    • Calling subscribe should never throw an error synchronously, subscriber pushes error: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ab2957a63b2e
[wpt PR 43233] - Observable: Implement signal aborting to prep for teardown, a=testonly
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b65997718aac
[wpt PR 43233] - Observable: Implement signal aborting to prep for teardown, a=testonly
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.