Closed
Bug 1186779
Opened 10 years ago
Closed 10 years ago
Make const_casts with AllocateAudioBlock() safer
Categories
(Core :: Web Audio, defect)
Core
Web Audio
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: karlt, Unassigned)
References
Details
Attachments
(2 files)
1.72 KB,
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
20.73 KB,
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1184801 +++
AllocateAudioBlock() expects const_cast to be used to write data for its new
chunk.
Reporter | ||
Comment 1•10 years ago
|
||
I first looked into returning float[WEBAUDIO_BLOCK_SIZE]* from
AllocateAudioBlock in order to provide compile-time constraints on usage.
That's probably possible, but would lose the feature of having all buffer
info on the AudioChunk, so requires handling the buffers through two different
objects and loses some run time channel count checking. It would also require
a re-org in code like AudioBufferSourceNode, which makes late decisions on
allocation.
This approach is simple, keeps everything in one place, and provides run-time
checking.
Attachment #8637723 -
Flags: review?(padenot)
Reporter | ||
Comment 2•10 years ago
|
||
Attachment #8637724 -
Flags: review?(padenot)
Updated•10 years ago
|
Attachment #8637723 -
Flags: review?(padenot) → review+
Updated•10 years ago
|
Attachment #8637724 -
Flags: review?(padenot) → review+
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/eb35e2460913
https://hg.mozilla.org/mozilla-central/rev/44b77af83570
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•