Closed
Bug 868776
Opened 12 years ago
Closed 12 years ago
Fix rooting hazards in Web Audio code
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
till
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #745571 -
Flags: review?(tschneidereit)
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #745571 -
Attachment is obsolete: true
Attachment #745571 -
Flags: review?(tschneidereit)
Attachment #745582 -
Flags: review?(tschneidereit)
Comment 3•12 years ago
|
||
Comment on attachment 745582 [details] [diff] [review]
Patch (v2)
Review of attachment 745582 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the return value checks added.
::: content/media/webaudio/AudioBuffer.cpp
@@ +99,5 @@
> const float* data = mSharedChannels->GetData(i);
> // The following code first zeroes the array and then copies our data
> // into it. We could avoid this with additional JS APIs to construct
> // an array (or ArrayBuffer) containing initial data.
> + JS::RootedObject array(aJSContext, JS_NewFloat32Array(aJSContext, mLength));
Damn, missed this earlier. JS_NewFloat32Array can return NULL, so please check the result here, too.
@@ +137,5 @@
> {
> RestoreJSChannelData(aJSContext);
>
> MOZ_ASSERT(aChannel < NumberOfChannels());
> + JS::RootedObject arrayBuffer(aJSContext, JS_NewArrayBufferWithContents(aJSContext, aContents));
And this, too.
@@ +142,1 @@
> mJSChannels[aChannel] = JS_NewFloat32ArrayWithBuffer(aJSContext, arrayBuffer,
And this.
Attachment #745582 -
Flags: review?(tschneidereit) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Assignee | ||
Comment 6•11 years ago
|
||
Mass moving Web Audio bugs to the Web Audio component. Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in
before you can comment on or make changes to this bug.
Description
•