Closed Bug 1811320 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 38067 - Reject pending setSinkId requests with valid ExceptionContext

Categories

(Core :: Web Audio, task, P4)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Alvin Ji <alvinji@chromium.org> wrote:

Reject pending setSinkId requests with valid ExceptionContext

Rejecting pending setSinkId requests is a step of
AudioContext::closeContext. Because it is rejecting pending setSinkId
from a different Promise entry call, it doesn't have a valid
ExceptionContext which lead a crash. This CL fixes it by creating a
fresh DOMException and attach it to the being rejected pending request
also add a test to guard this case.

Bug: 1408376
Change-Id: Ie3090c1b631ad3ec1132a5e2fba0f047fd01d3e3

Reviewed-on: https://chromium-review.googlesource.com/4179633
WPT-Export-Revision: 860482056b70f8bdf578b783d6b0c8dc0efe49c6

Component: web-platform-tests → Web Audio
Product: Testing → Core

CI Results

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

Total 1 tests and 8 subtests

Status Summary

Firefox

ERROR : 1
NOTRUN: 8

Chrome

CRASH : 1

Safari

ERROR : 1
NOTRUN: 8

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /webaudio/the-audio-api/the-audiocontext-interface/audiocontext-sinkid-setsinkid.https.html [wpt.fyi]: ERROR (Chrome: CRASH, Safari: ERROR)
    • setSinkId() with a valid device identifier should succeeded.: NOTRUN (Safari: NOTRUN)
    • setSinkId() with the same sink ID should resolve immediately.: NOTRUN (Safari: NOTRUN)
    • setSinkId() with the same AudioSinkOptions.type value should resolve immediately.: NOTRUN (Safari: NOTRUN)
    • setSinkId() should fail with TypeError on an invalid AudioSinkOptions.type value.: NOTRUN (Safari: NOTRUN)
    • setSinkId() should fail with NotFoundError on an invalid device identifier.: NOTRUN (Safari: NOTRUN)
    • setSinkId() should fail with InvalidStateError when calling from astopped AudioContext: NOTRUN (Safari: NOTRUN)
    • setSinkId() should fail with InvalidStateError when calling from adetached document: NOTRUN (Safari: NOTRUN)
    • pending setSinkId() should be rejected with InvalidStateError whenAudioContext is closed: NOTRUN (Safari: NOTRUN)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0e0e9f801d7b [wpt PR 38067] - Reject pending setSinkId requests with valid ExceptionContext, a=testonly https://hg.mozilla.org/integration/autoland/rev/b77463d76f24 [wpt PR 38067] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.