Commit bbd5c413 authored by hyatt's avatar hyatt
Browse files

Clean up the null image case in CachedImage::data to make sure the...

        Clean up the null image case in CachedImage::data to make sure the size totals will stay accurate.
        I'm not convinced this case can even be hit, but I'm cleaning it up just in case.

        * loader/CachedImage.cpp:
        (WebCore::CachedImage::data):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fcd275c4
2007-03-13 David Hyatt <hyatt@apple.com>
Clean up the null image case in CachedImage::data to make sure the size totals will stay accurate.
I'm not convinced this case can even be hit, but I'm cleaning it up just in case.
* loader/CachedImage.cpp:
(WebCore::CachedImage::data):
2007-03-13 David Hyatt <hyatt@apple.com>
 
Reorder the call to allReferencesRemoved, since otherwise the live object size will become
......
......@@ -217,12 +217,14 @@ void CachedImage::data(Vector<char>& data, bool allDataReceived)
// to decode.
if (sizeAvailable || allDataReceived) {
if (m_image->isNull()) {
m_errorOccurred = true;
notifyObservers();
// FIXME: I'm not convinced this case can even be hit.
error();
if (inCache())
cache()->remove(this);
} else
notifyObservers();
return;
}
notifyObservers();
if (m_image) {
Vector<char>& imageBuffer = m_image->dataBuffer();
......
Supports Markdown
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