github web-platform-tests/wpt merge_pr_47145

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
14 months ago

compute pressure: Make AddClient() return a pending receiver, not take a pending remote

The PressureManager.AddClient() Mojo call now returns both a
PressureStatus as well as a pending_receiver instead of
taking a pending_remote as one of its arguments.

Doing so avoids having to always bind a pending Remote in
ProbesManager::AddClient() even if the function is supposed to return
kNotSupported, as otherwise there could be a race where Blink's
PressureClientImpl::receiver_'s disconnect handler would be called
before PressureObserverManager::DidAddClient(), in which case pending
promises from PressureObserver.observe() would never resolve or reject.
This can be seen in the win-rel results in
https://chromium-review.googlesource.com/c/chromium/src/+/5664721?checksPatchset=5&tab=checks
for example.

Bug: 347031400
Change-Id: Ifba1ec58a3d048c2a741553bd80e332c7683e932
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5690991
Reviewed-by: Reilly Grant reillyg@chromium.org
Commit-Queue: Raphael Kubo Da Costa raphael.kubo.da.costa@intel.com
Reviewed-by: Arthur Sonzogni arthursonzogni@chromium.org
Cr-Commit-Position: refs/heads/main@{#1328020}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.