Closed Bug 934440 Opened 6 years ago Closed 6 years ago

Statically assert that MEDIA_STREAM_DEST_TRACK_ID is different than AUDIO_NODE_STREAM_TRACK_ID

Categories

(Core :: Web Audio, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jdm, Assigned: lpy)

Details

(Whiteboard: [good first bug][mentor=jdm][lang=c++][qa-])

Attachments

(1 file, 3 obsolete files)

There's a comment in MediaStreamAudioDestinationNode stating that the two constants should be different. We should add a static assertion that checks that this is true using static_assert.
OS: Linux → All
Hardware: x86_64 → All
Version: 24 Branch → unspecified
Seems easy and I can learn something from the code, I will try to work on it after I read some code.
http://mxr.mozilla.org/mozilla-central/source/content/media/webaudio/MediaStreamAudioDestinationNode.cpp#26
Comment is in lien 26 in MediaStreamAudioDestinationNode
Assignee: nobody → pylaurent1314
Attached patch bug934440.patch (obsolete) — Splinter Review
Comment on attachment 827101 [details] [diff] [review]
bug934440.patch

Review of attachment 827101 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/webaudio/MediaStreamAudioDestinationNode.cpp
@@ +22,5 @@
>  
>  NS_IMPL_ADDREF_INHERITED(MediaStreamAudioDestinationNode, AudioNode)
>  NS_IMPL_RELEASE_INHERITED(MediaStreamAudioDestinationNode, AudioNode)
>  
> +// This must be a different value than AUDIO_TRACK

This comment can go away now; the assertion make it clear.
Attachment #827101 - Flags: review+
Keywords: checkin-needed
Attached patch bug934440.patch (obsolete) — Splinter Review
delete comment
Attachment #827101 - Attachment is obsolete: true
Attachment #830128 - Flags: review+
Attached patch bug934440.patch (obsolete) — Splinter Review
Attachment #830128 - Attachment is obsolete: true
Attachment #830573 - Flags: review+
Keywords: checkin-needed
Attached patch bug934440.patchSplinter Review
Attachment #830573 - Attachment is obsolete: true
Attachment #830807 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/d1da506d529f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [good first bug][mentor=jdm][lang=c++] → [good first bug][mentor=jdm][lang=c++][qa-]
You need to log in before you can comment on or make changes to this bug.