mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 856771 - Protect the source buffer nodes from leaking when their binding goes away without being played back; r=roc
This commit is contained in:
parent
05355e60c2
commit
9c134ee172
@ -146,8 +146,14 @@ AudioBlockPanStereoToStereo(const float aInputL[WEBAUDIO_BLOCK_SIZE],
|
||||
*/
|
||||
class AudioNodeEngine {
|
||||
public:
|
||||
AudioNodeEngine() {}
|
||||
virtual ~AudioNodeEngine() {}
|
||||
AudioNodeEngine()
|
||||
{
|
||||
MOZ_COUNT_CTOR(AudioNodeEngine);
|
||||
}
|
||||
virtual ~AudioNodeEngine()
|
||||
{
|
||||
MOZ_COUNT_DTOR(AudioNodeEngine);
|
||||
}
|
||||
|
||||
virtual void SetStreamTimeParameter(uint32_t aIndex, TrackTicks aParam)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@ static const int AUDIO_NODE_STREAM_TRACK_ID = 1;
|
||||
|
||||
AudioNodeStream::~AudioNodeStream()
|
||||
{
|
||||
MOZ_COUNT_DTOR(AudioNodeStream);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
{
|
||||
// AudioNodes are always producing data
|
||||
mHasCurrentData = true;
|
||||
MOZ_COUNT_CTOR(AudioNodeStream);
|
||||
}
|
||||
~AudioNodeStream();
|
||||
|
||||
|
@ -16,6 +16,7 @@ MOCHITEST_FILES := \
|
||||
test_bug827541.html \
|
||||
test_bug839753.html \
|
||||
test_bug845960.html \
|
||||
test_bug856771.html \
|
||||
test_analyserNode.html \
|
||||
test_AudioBuffer.html \
|
||||
test_AudioContext.html \
|
||||
|
29
content/media/webaudio/test/test_bug856771.html
Normal file
29
content/media/webaudio/test/test_bug856771.html
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for bug 856771</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(function() {
|
||||
SpecialPowers.setBoolPref("media.webaudio.enabled", true);
|
||||
|
||||
var context = new AudioContext();
|
||||
|
||||
var source = context.createBufferSource();
|
||||
source.connect(context.destination);
|
||||
ok(true, "Nothing should leak");
|
||||
|
||||
SpecialPowers.clearUserPref("media.webaudio.enabled");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user