Remember to stop image loads to break connection back to pres context

git-svn-id: svn://10.0.0.236/trunk@28924 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1999-04-23 19:57:49 +00:00
parent 6cef382634
commit 259cb7aa9d
2 changed files with 6 additions and 0 deletions

View File

@@ -736,6 +736,7 @@ nsPresContext::StartLoadImage(const nsString& aURL,
aTargetFrame, aCallBack, aClosure);
if (NS_OK != rv) {
mImageLoaders.RemoveElement(loader);
loader->StopImageLoad();
NS_RELEASE(loader);
// Undo premature store of reslut
@@ -780,6 +781,7 @@ nsPresContext::StopLoadImage(nsIFrame* aTargetFrame,
PRBool safe;
loader->SafeToDestroy(&safe);
if (safe) {
loader->StopImageLoad();
NS_RELEASE(loader);
mImageLoaders.RemoveElementAt(i);
n--;
@@ -804,6 +806,7 @@ nsPresContext::StopAllLoadImagesFor(nsIFrame* aTargetFrame)
loader->RemoveFrame(aTargetFrame);
loader->SafeToDestroy(&safe);
if (safe) {
loader->StopImageLoad();
NS_RELEASE(loader);
mImageLoaders.RemoveElementAt(i);
n--;