summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-01-30 11:15:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-30 12:13:26 +0100
commitf5d7c6904da2dc5483bdfc202cb921b1c816f57a (patch)
tree985eb4c8b81cff570c50962a27a40cbb78f7d554
parent5535b404cb32791f510193073c9d15470552129f (diff)
Do not notifyFinished on resources never loaded
If autoload images is disabled, the CachedImage element never starts loading but still needs loading. We therefore need to check both isLoading() and stillNeedsLoad() to determine if loading is complete. This fixes a serious memory leak when autoload images is disabled. Task-number: QTBUG-34494 Change-Id: I36811179d95e23651fabe484fbde08e2881d822b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r--Source/WebCore/loader/cache/CachedResource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/loader/cache/CachedResource.cpp b/Source/WebCore/loader/cache/CachedResource.cpp
index 385e325ed..5aff5f847 100644
--- a/Source/WebCore/loader/cache/CachedResource.cpp
+++ b/Source/WebCore/loader/cache/CachedResource.cpp
@@ -361,7 +361,7 @@ void CachedResource::load(CachedResourceLoader* cachedResourceLoader, const Reso
void CachedResource::checkNotify()
{
- if (isLoading())
+ if (isLoading() || stillNeedsLoad())
return;
CachedResourceClientWalker<CachedResourceClient> w(m_clients);