WebCore:
Reviewed by Geoff.
<rdar://problem/
5430165>
REGRESSION: Dynamically loaded images fail to load
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::HTMLImageLoader):
Initialize the m_elementIsProtected member.
(WebCore::HTMLImageLoader::~HTMLImageLoader):
Assert that the element is not protected.
(WebCore::HTMLImageLoader::setLoadingImage):
If the image is not null, protect the element. Otherwise, unprotect it.
(WebCore::HTMLImageLoader::dispatchLoadEvent):
Unprotect the element here.
(WebCore::HTMLImageLoader::protectElement):
(WebCore::HTMLImageLoader::unprotectElement):
New methods which protect and unprotect the element.
* html/HTMLImageLoader.h:
LayoutTests:
Reviewed by Geoff.
<rdar://problem/
5430165>
REGRESSION: Dynamically loaded images fail to load
* fast/dom/HTMLImageElement/image-loading-gc-expected.txt: Added.
* fast/dom/HTMLImageElement/image-loading-gc.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25227
268f45cc-cd09-0410-ab3c-
d52691b4dbfc