Bug 114709 - Repeated use of decodeAudioData() causes leak
Summary: Repeated use of decodeAudioData() causes leak
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 15:28 PDT by Jer Noble
Modified: 2013-04-16 16:16 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.04 KB, patch)
2013-04-16 15:34 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (9.04 KB, patch)
2013-04-16 15:45 PDT, Jer Noble
ggaren: review+
eflews.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2013-04-16 15:28:28 PDT
Repeated use of decodeAudioData() causes leak
Comment 1 Jer Noble 2013-04-16 15:28:48 PDT
I made a test case that uses a single arrayBuffer to feed repeated calls to decodeAudioData() and see the "leak".  But it's not really a "leak", per se.  It's just that the garbage collector doesn't know how big these audio buffers actually are.  Once their size is correctly reported to the GC, they are deleted much more rapidly, and a steady state of only a few live objects is attained.
Comment 2 Jer Noble 2013-04-16 15:30:09 PDT
<rdar://problem/12804159>
Comment 3 Jer Noble 2013-04-16 15:34:57 PDT
Created attachment 198445 [details]
Patch
Comment 4 WebKit Commit Bot 2013-04-16 15:38:04 PDT
Attachment 198445 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/Modules/webaudio/AudioBuffer.cpp', u'Source/WebCore/Modules/webaudio/AudioBuffer.h', u'Source/WebCore/Modules/webaudio/AudioBuffer.idl', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/bindings/js/JSAudioBufferCustom.cpp']" exit_code: 1
Source/WebCore/bindings/js/JSAudioBufferCustom.cpp:27:  You should add a blank line after implementation file's own header.  [build/include_order] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Jer Noble 2013-04-16 15:45:09 PDT
Created attachment 198448 [details]
Patch

Address the stylebot's review.
Comment 6 Geoffrey Garen 2013-04-16 15:54:12 PDT
Comment on attachment 198448 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=198448&action=review

r=me

> Source/WebCore/Modules/webaudio/AudioBuffer.h:71
> +    size_t extraMemoryCost() const;

Slight nit: from the audio buffer's perspective, this is just "cost", not "extra cost".
Comment 7 EFL EWS Bot 2013-04-16 16:05:35 PDT
Comment on attachment 198448 [details]
Patch

Attachment 198448 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/85192
Comment 8 Jer Noble 2013-04-16 16:16:40 PDT
Committed r148566: <http://trac.webkit.org/changeset/148566>