mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1749308 - Don't attempt to send a message to the graph after a ScriptProcessorNode has been marked for collection. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D135612
This commit is contained in:
parent
dae26c566f
commit
5dc3029a55
18
dom/media/tests/crashtests/1749308.html
Normal file
18
dom/media/tests/crashtests/1749308.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
window.addEventListener("load", () => {
|
||||
const context = new AudioContext({})
|
||||
const controller = new AbortController()
|
||||
let processor = context.createScriptProcessor(512, 27, 2)
|
||||
processor.addEventListener("audioprocess", async () => {}, { signal: controller.signal })
|
||||
processor = null;
|
||||
SpecialPowers.forceGC()
|
||||
for (let i = 0; i < 7; i++) {
|
||||
controller.abort();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
@ -35,3 +35,4 @@ load 1576938.html
|
||||
skip-if(Android) pref(media.getusermedia.audiocapture.enabled,true) load 1573536.html
|
||||
skip-if(!Android) pref(media.getusermedia.audiocapture.enabled,true) pref(media.navigator.permission.device,false) load 1573536.html # media.navigator.permission.device is mobile-only, so other platforms fail to set it (Bug 1350948)
|
||||
load 1594136.html
|
||||
load 1749308.html
|
||||
|
@ -505,7 +505,7 @@ void ScriptProcessorNode::EventListenerAdded(nsAtom* aType) {
|
||||
|
||||
void ScriptProcessorNode::EventListenerRemoved(nsAtom* aType) {
|
||||
AudioNode::EventListenerRemoved(aType);
|
||||
if (aType == nsGkAtoms::onaudioprocess) {
|
||||
if (aType == nsGkAtoms::onaudioprocess && mTrack) {
|
||||
UpdateConnectedStatus();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user