Changeset 148566 in webkit
- Timestamp:
- Apr 16, 2013 4:17:54 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148564 r148566 1 2013-04-16 Jer Noble <jer.noble@apple.com> 2 3 Repeated use of decodeAudioData() causes leak 4 https://bugs.webkit.org/show_bug.cgi?id=114709 5 6 Reviewed by Geoffrey Garen. 7 8 Report the correct size of the AudioBuffer to the garbage collector so that creating 9 these large buffers will trigger garbage collection. 10 11 * Modules/webaudio/AudioBuffer.cpp: 12 (WebCore::AudioBuffer::memoryCost): Added; simple sum of the buffer sizes in m_channels; 13 * Modules/webaudio/AudioBuffer.h: 14 * Modules/webaudio/AudioBuffer.idl: Add the CustomToJSObject flag. 15 * WebCore.xcodeproj/project.pbxproj: 16 * bindings/js/JSAudioBufferCustom.cpp: Added. 17 (WebCore::toJS): Added; report the extra size of an AudioBuffer when the wrapper 18 is created. 19 1 20 2013-04-16 Beth Dakin <bdakin@apple.com> 2 21 -
trunk/Source/WebCore/Modules/webaudio/AudioBuffer.cpp
r123996 r148566 117 117 } 118 118 119 size_t AudioBuffer::memoryCost() const 120 { 121 size_t cost = 0; 122 for (unsigned i = 0; i < m_channels.size() ; ++i) 123 cost += m_channels[i]->byteLength(); 124 return cost; 125 } 126 119 127 } // namespace WebCore 120 128 -
trunk/Source/WebCore/Modules/webaudio/AudioBuffer.h
r123996 r148566 68 68 // Careful! Only call this when the page unloads, after the AudioContext is no longer processing. 69 69 void releaseMemory(); 70 71 size_t memoryCost() const; 70 72 71 73 protected: -
trunk/Source/WebCore/Modules/webaudio/AudioBuffer.idl
r141034 r148566 29 29 [ 30 30 Conditional=WEB_AUDIO, 31 CustomToJSObject, 31 32 ImplementationLacksVTable 32 33 ] interface AudioBuffer { -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r148467 r148566 5237 5237 CDC69DDB16371FD4007C38DF /* WebCoreFullScreenPlaceholderView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC69DD916371FD3007C38DF /* WebCoreFullScreenPlaceholderView.mm */; }; 5238 5238 CDD525D7145B6DD0008D204D /* JSHTMLMediaElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDF65CCC145B6AFE00C4C7AA /* JSHTMLMediaElementCustom.cpp */; }; 5239 CDDE691F171DFAD000A44D89 /* JSAudioBufferCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDDE691D171DF89100A44D89 /* JSAudioBufferCustom.cpp */; }; 5239 5240 CDEA763014608A53008B31F1 /* PlatformClockCA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */; }; 5240 5241 CDEA76341460B56F008B31F1 /* ClockGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA76321460AE29008B31F1 /* ClockGeneric.cpp */; }; … … 11997 11998 CDCE5CD014633BC900D47CCA /* EventTargetFactory.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventTargetFactory.in; sourceTree = "<group>"; }; 11998 11999 CDD1E525167BA56400CE820B /* TextTrackRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackRepresentation.h; sourceTree = "<group>"; }; 12000 CDDE691D171DF89100A44D89 /* JSAudioBufferCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBufferCustom.cpp; sourceTree = "<group>"; }; 11999 12001 CDEA762C14608224008B31F1 /* Clock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clock.h; sourceTree = "<group>"; }; 12000 12002 CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformClockCA.cpp; sourceTree = "<group>"; }; … … 18805 18807 BC2ED6BB0C6BD2F000920BFF /* JSAttrCustom.cpp */, 18806 18808 FDEAAAEF12B02EE400DCF33B /* JSAudioBufferSourceNodeCustom.cpp */, 18809 CDDE691D171DF89100A44D89 /* JSAudioBufferCustom.cpp */, 18807 18810 FDEAAAF012B02EE400DCF33B /* JSAudioContextCustom.cpp */, 18808 18811 FD8AA63B1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp */, … … 25466 25469 A80A9423149F225E00989291 /* JSDOMWindowWebAudioCustom.cpp in Sources */, 25467 25470 A80A9425149F227100989291 /* JSDOMWindowWebSocketCustom.cpp in Sources */, 25471 CDDE691F171DFAD000A44D89 /* JSAudioBufferCustom.cpp in Sources */, 25468 25472 FD7868B9136B999200D403DF /* JSDynamicsCompressorNode.cpp in Sources */, 25469 25473 65DF31F909D1CC60000BE325 /* JSElement.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.