Bug 309386 Document what a null stream listener from loadImageWithChannel means

r=pavlov sr=bz
This commit is contained in:
cbiesinger%web.de 2005-10-12 18:42:02 +00:00
Родитель 344b4be95e
Коммит 0a14a7ee2b
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -96,6 +96,10 @@ interface imgILoader : nsISupports
* @param uri the URI to load
* @param aObserver the observer
* @param cx some random data
* @param aListener [out]
* A listener that should receive the data. Can be null, in which
* case imagelib has found a cached image and is not interested in
* the data. The caller needs not cancel the channel in this case.
*
* libpr0n does NOT keep a strong ref to the observer; this prevents
* reference cycles. This means that callers of loadImageWithChannel should

Просмотреть файл

@ -622,9 +622,6 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
if (request) {
// we have this in our cache already.. cancel the current (document) load
/* XXX If |*listener| is null when we return here, the caller should
probably cancel the channel instead of us doing it here.
*/
channel->Cancel(NS_IMAGELIB_ERROR_LOAD_ABORTED); // this should fire an OnStopRequest
*listener = nsnull; // give them back a null nsIStreamListener