Bug 839753 - Fix up CC implementation for AudioDestinationNode. r=smaug

This commit is contained in:
Andrew McCreight 2013-02-12 08:42:59 -08:00
parent f44fe501df
commit 55aaf1428b
3 changed files with 30 additions and 5 deletions

View File

@ -14,16 +14,20 @@
namespace mozilla {
namespace dom {
NS_IMPL_ISUPPORTS_INHERITED0(AudioDestinationNode, AudioNode)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AudioDestinationNode, AudioNode)
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioDestinationNode, AudioNode) \
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioDestinationNode, AudioNode)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(AudioDestinationNode)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioDestinationNode)
NS_INTERFACE_MAP_END_INHERITING(AudioNode)
NS_IMPL_CYCLE_COLLECTING_ADDREF(AudioDestinationNode)
NS_IMPL_CYCLE_COLLECTING_RELEASE(AudioDestinationNode)
AudioDestinationNode::AudioDestinationNode(AudioContext* aContext, MediaStreamGraph* aGraph)
: AudioNode(aContext)
{

View File

@ -14,6 +14,7 @@ MOCHITEST_FILES := \
webaudio.js \
test_bug808374.html \
test_bug827541.html \
test_bug839753.html \
test_AudioBuffer.html \
test_AudioContext.html \
test_AudioListener.html \

View File

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Crashtest for bug 839753</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);
AudioContext().destination.expando = null;
ok(true, "The test should not trigger wrapper cache assertions");
SpecialPowers.clearUserPref("media.webaudio.enabled");
</script>
</pre>
</body>
</html>