[wpt-sync] Sync PR 61327 - [WebAudio] Implement AudioWorkletNode lifetime fix (part 2 of 2)
Categories
(Core :: Web Audio, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 61327 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/61327
Details from upstream follow.
Mahesh Bharadwaj Kannan <kmaheshb@google.com> wrote:
[WebAudio] Implement AudioWorkletNode lifetime fix (part 2 of 2)
This CL implements the spec-compliant lifetime logic for
AudioWorkletNode.Specifically:
- We track the active source flag of the processor.
- In AudioWorkletHandler::Process(), we check if there are active
connected inputs. If the active source flag is false and there are no
active inputs, we terminate the processor early and skip JS execution.- We resolve a thread-safety hazard by pre-binding a WeakPtr to the
handler on the main thread and copying it on the audio thread.- We refactor the cleanup and input connection checks into private
helpers for better readability and style.- We pass nullptr to inputs when they are disconnected to remain spec-
compliant (0 channels in JS).- We fix a boundary-stopping delay in AudioScheduledSourceHandler to
ensure source nodes finish immediately when scheduled to stop on a
quantum boundary, resolving a 1-quantum lag in downstream
disconnection.- We fix a DCHECK failure in AudioScheduledSourceHandler by restricting
zeroing to strictly less than quantum end.- We make the zero-output-processor.js test processor robust against
0-channel inputs when disconnected.- We remove the expected failure baseline for the WPT test as it now
passes completely.Bug: 41435286
Test: third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-lifetime.https.html
Change-Id: I6499feddbb119c3220781bfd8561dc241ffcf37b
Reviewed-on: https://chromium-review.googlesource.com/8093149
WPT-Export-Revision: 38e281751e240957c90a1f99c2a940dceddb5cb8
| Assignee | ||
Updated•7 days ago
|
| Assignee | ||
Comment 1•6 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=ed2964312263759b8d874e86f236ccb29d1d444f
| Assignee | ||
Comment 2•6 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 39 tests and 3 subtests
Status Summary
Firefox
OK : 1[GitHub] 32[Gecko-android-em-14-x86_64-debug-geckoview] 36[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 37[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 8[GitHub] 136[Gecko-android-em-14-x86_64-debug-geckoview] 149[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 157[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 21
Chrome
OK : 1
PASS: 8
Safari
OK : 1
PASS: 8
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-postmessage-sharedarraybuffer.https.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-rendersizehint.https.html [wpt.fyi]:
SKIP - /webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-automatic-pull.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:OK, Safari:OK) - /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-audioparam-iterable.https.html [wpt.fyi]
- Values for a control-rate parameter.automationRate match for set:
FAIL - Values for 你好.automationRate match for set:
FAIL - Values for 🎶.automationRate match for set:
FAIL - Values for a control-rate parameter.automationRate match for array:
FAIL - Values for 你好.automationRate match for array:
FAIL - Values for 🎶.automationRate match for array:
FAIL - Values for a control-rate parameter.automationRate match for generator:
FAIL - Values for 你好.automationRate match for generator:
FAIL - Values for 🎶.automationRate match for generator:
FAIL
- Values for a control-rate parameter.automationRate match for set:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-audioparam-range.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-audioparam-size.https.html [wpt.fyi]
- Executing "Verify Size of AudioParam Arrays":
FAIL
- Executing "Verify Size of AudioParam Arrays":
- /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-audioparam.https.html [wpt.fyi]
- Verifying AudioParam in AudioWorkletNode:
FAIL
- Verifying AudioParam in AudioWorkletNode:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.html [wpt.fyi]
- Test denormal behavior in AudioWorkletGlobalScope:
FAIL
- Test denormal behavior in AudioWorkletGlobalScope:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/audioworkletglobalscope-timing-info.https.html [wpt.fyi]
- Check the timing information from AudioWorkletProcessor:
FAIL
- Check the timing information from AudioWorkletProcessor:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-channel-count.https.html [wpt.fyi]
- setup-buffer-and-worklet-verify-rendered-buffer:
FAIL
- setup-buffer-and-worklet-verify-rendered-buffer:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html [wpt.fyi]
- Input array length should be zero for disconnected input:
FAIL
- Input array length should be zero for disconnected input:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-output-channel-count.https.html [wpt.fyi]
- AudioWorkletNode channel count: dynamic propagation and honoring outputChannelCount (single serialized test).:
FAIL
- AudioWorkletNode channel count: dynamic propagation and honoring outputChannelCount (single serialized test).:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-param-getter-overridden.https.html [wpt.fyi]
- Test if AudioWorkletProcessor with invalid parameters array getter:
FAIL
- Test if AudioWorkletProcessor with invalid parameters array getter:
- /webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https.html [wpt.fyi]
- X |inputs| is frozen is not true. Got false.:
FAIL - X |outputs| is frozen is not true. Got false.:
FAIL - < [check-frozen-array] 2 out of 2 assertions were failed.:
FAIL -
AUDIT TASK RUNNER FINISHED: 1 out of 2 tasks were failed.:
FAIL
- X |inputs| is frozen is not true. Got false.:
- /webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/process-getter.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview]
Tests Disabled in Gecko Infrastructure
- /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-postmessage-sharedarraybuffer.https.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-rendersizehint.https.html [wpt.fyi]:
SKIP - /webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-automatic-pull.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:OK, Safari:OK) - /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-audioparam-range.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview] - /webaudio/the-audio-api/the-audioworklet-interface/process-getter.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview]
https://hg.mozilla.org/mozilla-central/rev/0a6e8c207f5b
https://hg.mozilla.org/mozilla-central/rev/7a616f20f64d
Description
•