Commit b54df599 authored by oliver@apple.com's avatar oliver@apple.com

<rdar://problem/6127705> Excessive memory consumption on image load failure

Reviewed by Antti Koivisto and Darin Adler

When we fail to decode an image we clear most of the image data, but not the
input data itself, which can be backed by a CFData object that itself holds onto
a few hundred Kbs of memory.  This patch merely ensures that this buffer gets
cleared.


git-svn-id: svn://svn.chromium.org/blink/trunk@42664 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 4b36a66d
2009-04-19 Oliver Hunt <oliver@apple.com>
Reviewed by Antti Koivisto and Darin Adler.
<rdar://problem/6127705> Excessive memory consumption on image load failure
When we fail to decode an image we clear most of the image data, but not the
input data itself, which can be backed by a CFData object that itself holds onto
a few hundred Kbs of memory. This patch merely ensures that this buffer gets
cleared.
* loader/CachedImage.cpp:
(WebCore::CachedImage::error):
2009-04-19 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
......@@ -307,6 +307,7 @@ void CachedImage::error()
{
clear();
m_errorOccurred = true;
m_data.clear();
notifyObservers();
m_loading = false;
checkNotify();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment