From 1efde4a2e687b4c51c61464981e7a34a687c78e9 Mon Sep 17 00:00:00 2001 From: Peiyong Lin Date: Tue, 12 Nov 2013 08:37:17 -0500 Subject: [PATCH] Bug 934440 - Statically assert that MEDIA_STREAM_DEST_TRACK_ID is different than AUDIO_TRACK. r=jdm --- content/media/webaudio/MediaStreamAudioDestinationNode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/media/webaudio/MediaStreamAudioDestinationNode.cpp b/content/media/webaudio/MediaStreamAudioDestinationNode.cpp index cfa57bdc845..475ce3a0962 100644 --- a/content/media/webaudio/MediaStreamAudioDestinationNode.cpp +++ b/content/media/webaudio/MediaStreamAudioDestinationNode.cpp @@ -23,8 +23,9 @@ NS_INTERFACE_MAP_END_INHERITING(AudioNode) NS_IMPL_ADDREF_INHERITED(MediaStreamAudioDestinationNode, AudioNode) NS_IMPL_RELEASE_INHERITED(MediaStreamAudioDestinationNode, AudioNode) -// This must be a different value than AUDIO_NODE_STREAM_TRACK_ID static const int MEDIA_STREAM_DEST_TRACK_ID = 2; +static_assert(MEDIA_STREAM_DEST_TRACK_ID != AudioNodeStream::AUDIO_TRACK, + "MediaStreamAudioDestinationNode::MEDIA_STREAM_DEST_TRACK_ID must be a different value than AudioNodeStream::AUDIO_TRACK"); class MediaStreamDestinationEngine : public AudioNodeEngine { public: