[Webkit-unassigned] [Bug 22191] New: logic error in CachedImage.cpp
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 11 17:07:35 PST 2008
https://bugs.webkit.org/show_bug.cgi?id=22191
Summary: logic error in CachedImage.cpp
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ovafai at gmail.com
I don't have a testcase for this other than to say that is causes a crash in
the Chromium build when loading an image resource fails, but the logic seems
obviously wrong.
error() calls clear(), which calls destroyDecodedData(). destoryDecodedData()
checks m_errorOccurred, which is set to true *after* the clear() call in
error(). Seems like those two lines just need to be swapped.
void CachedImage::error()
{
clear();
m_errorOccurred = true;
notifyObservers();
m_loading = false;
checkNotify();
}
void CachedImage::clear()
{
destroyDecodedData();
m_image = 0;
setEncodedSize(0);
}
void CachedImage::destroyDecodedData()
{
if (m_image && !m_errorOccurred)
m_image->destroyDecodedData();
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list