Closed Bug 1799849 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 36883 - [ComputePressure] Make observe method return promise

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Wei4 Wang <wei4.wang@intel.com> wrote:

[ComputePressure] Make observe method return promise

This CL partially reverts changes made in [1] to make observe method
return promise. The reason is that, according to the spec [2], getting
the current permission state with "compute-pressure" needs to be done
in observe method, which tends to be asynchronous. So making observe
method return promise is necessary. More detailed information can be
found in [3].

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3867324
[2] https://wicg.github.io/compute-pressure/#the-observe-method
[3] https://github.com/WICG/compute-pressure/issues/146

Bug: 1382617
Change-Id: I4426b5f9a5af2259da10b690e1c348d9f6b75cea
Reviewed-on: https://chromium-review.googlesource.com/4014743
WPT-Export-Revision: 2e1ff778296e3fe99d9529531ae5a659cd5be32e

PR 36883 applied with additional changes from upstream: bfd9ac376426b359ca07cac8a5ef68872f6d1b0c
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
Whiteboard: [wptsync downstream error] → [wptsync downstream]
You need to log in before you can comment on or make changes to this bug.