Closed Bug 1660512 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 25185 - Audio|VideoDecoderBroker: more weakptr, keep callbacks on main thread.

Categories

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

task

Tracking

(firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Chris Cunningham <chcunningham@chromium.org> wrote:

Audio|VideoDecoderBroker: more weakptr, keep callbacks on main thread.

Using unretained for decoder/selector callbacks is generally not safe /
fragile. For ex, some decoders (e.g. those that offload) will call the
output callback after destruction. Another example: decoder selector
internally posts the Select() callback, so it may run after destruction.

Additionally, sending incoming callbacks as CrossThreadFunctions for
invoking on the media thread is not safe. We may destruct while some
callbacks are still pending, destroying the callbacks internal state
(including bindings to blink GC types) off the main thread. Now we
ensure that all callbacks are saved on the main thread and we extend
the "client" interfaces of the broker for proxying the callbacks safely.

Bug: 1120431

Change-Id: I2ccfe46982cda9b18e47a56424b25f54f8877883

Reviewed-on: https://chromium-review.googlesource.com/2366661
WPT-Export-Revision: 13fd8de6e08bccf10b3aad1d601ba44e5581f49e

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 1 tests and 8 subtests

Status Summary

Firefox

FAIL : 6
TIMEOUT: 2
ERROR : 1

Chrome

FAIL : 6
TIMEOUT: 2
ERROR : 1

Safari

FAIL : 6
TIMEOUT: 2
ERROR : 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/webcodecs/video-decoder.html: ERROR (Chrome: ERROR, Safari: ERROR)
Test VideoDecoder.configure() codec validity: TIMEOUT (Chrome: TIMEOUT, Safari: TIMEOUT)
Closed decoder: FAIL (Chrome: FAIL, Safari: FAIL)
Decode corrupt VP9 frame: FAIL (Chrome: FAIL, Safari: FAIL)
Decode VP9: FAIL (Chrome: FAIL, Safari: FAIL)
Close while decoding corrupt VP9 frame: FAIL (Chrome: FAIL, Safari: FAIL)
Decode without configure: FAIL (Chrome: FAIL, Safari: FAIL)
Test VideoDecoder construction: TIMEOUT (Chrome: TIMEOUT, Safari: TIMEOUT)
Decode empty VP9 frame: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/05f416dc81a3
[wpt PR 25185] - Audio|VideoDecoderBroker: more weakptr, keep callbacks on main thread., a=testonly
https://hg.mozilla.org/integration/autoland/rev/90a2631e4e98
[wpt PR 25185] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.