Do not notifyFinished on resources never loaded
authorAllan Sandfeld Jensen <allan.jensen@digia.com>
Thu, 30 Jan 2014 10:15:18 +0000 (11:15 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 30 Jan 2014 11:13:26 +0000 (12:13 +0100)
commitf5d7c6904da2dc5483bdfc202cb921b1c816f57a
tree985eb4c8b81cff570c50962a27a40cbb78f7d554
parent5535b404cb32791f510193073c9d15470552129f
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>
Source/WebCore/loader/cache/CachedResource.cpp