Bug 869476. nsImageLoadingContent::Track/UntrackImage should return void. r=khuey

This commit is contained in:
Timothy Nikkel 2013-05-07 13:38:35 -05:00
parent 8262d988c0
commit 2c413efad1
2 changed files with 6 additions and 8 deletions

View File

@ -1296,11 +1296,11 @@ nsImageLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent)
doc->UnblockOnload(false);
}
nsresult
void
nsImageLoadingContent::TrackImage(imgIRequest* aImage, uint32_t aFlags /* = 0 */)
{
if (!aImage)
return NS_OK;
return;
MOZ_ASSERT(aImage == mCurrentRequest || aImage == mPendingRequest,
"Why haven't we heard of this request?");
@ -1317,14 +1317,13 @@ nsImageLoadingContent::TrackImage(imgIRequest* aImage, uint32_t aFlags /* = 0 */
doc->AddImage(mPendingRequest);
}
}
return NS_OK;
}
nsresult
void
nsImageLoadingContent::UntrackImage(imgIRequest* aImage, uint32_t aFlags /* = 0 */)
{
if (!aImage)
return NS_OK;
return;
MOZ_ASSERT(aImage == mCurrentRequest || aImage == mPendingRequest,
"Why haven't we heard of this request?");
@ -1356,7 +1355,6 @@ nsImageLoadingContent::UntrackImage(imgIRequest* aImage, uint32_t aFlags /* = 0
aImage->RequestDiscard();
}
}
return NS_OK;
}

View File

@ -337,11 +337,11 @@ protected:
enum {
SKIP_FRAME_CHECK = 0x1
};
nsresult TrackImage(imgIRequest* aImage, uint32_t aFlags = 0);
void TrackImage(imgIRequest* aImage, uint32_t aFlags = 0);
enum {
REQUEST_DISCARD = 0x1
};
nsresult UntrackImage(imgIRequest* aImage, uint32_t aFlags = 0);
void UntrackImage(imgIRequest* aImage, uint32_t aFlags = 0);
/* MEMBERS */
nsRefPtr<imgRequestProxy> mCurrentRequest;