mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 866737 - Unregister PannerNodes when they're unlinked by the cycle collector; r=padenot
This commit is contained in:
parent
581f025119
commit
aa479f73fd
@ -15,6 +15,21 @@ namespace dom {
|
||||
|
||||
using namespace std;
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(PannerNode)
|
||||
if (tmp->Context()) {
|
||||
tmp->Context()->UnregisterPannerNode(tmp);
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(AudioNode)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PannerNode, AudioNode)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(PannerNode)
|
||||
NS_INTERFACE_MAP_END_INHERITING(AudioNode)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(PannerNode, AudioNode)
|
||||
NS_IMPL_RELEASE_INHERITED(PannerNode, AudioNode)
|
||||
|
||||
class PannerNodeEngine : public AudioNodeEngine
|
||||
{
|
||||
public:
|
||||
|
@ -38,6 +38,9 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PannerNode, AudioNode)
|
||||
|
||||
PanningModelType PanningModel() const
|
||||
{
|
||||
return mPanningModel;
|
||||
|
@ -17,6 +17,7 @@ MOCHITEST_FILES := \
|
||||
test_bug839753.html \
|
||||
test_bug845960.html \
|
||||
test_bug856771.html \
|
||||
test_bug866737.html \
|
||||
test_analyserNode.html \
|
||||
test_AudioBuffer.html \
|
||||
test_AudioContext.html \
|
||||
|
40
content/media/webaudio/test/test_bug866737.html
Normal file
40
content/media/webaudio/test/test_bug866737.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for bug 866737</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">
|
||||
|
||||
SpecialPowers.setBoolPref("media.webaudio.enabled", true);
|
||||
|
||||
var context = new AudioContext();
|
||||
|
||||
(function() {
|
||||
var d = context.createDelay();
|
||||
var panner = context.createPanner();
|
||||
d.connect(panner);
|
||||
var gain = context.createGain();
|
||||
panner.connect(gain);
|
||||
gain.connect(context.destination);
|
||||
gain.disconnect(0);
|
||||
})();
|
||||
|
||||
SpecialPowers.forceGC();
|
||||
SpecialPowers.forceCC();
|
||||
|
||||
var gain = context.createGain();
|
||||
gain.connect(context.destination);
|
||||
gain.disconnect(0);
|
||||
|
||||
ok(true, "No crashes should happen!");
|
||||
|
||||
SpecialPowers.clearUserPref("media.webaudio.enabled");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user