mStreamListener = new ImageListener(this); if (!mStreamListener)
NS_ASSERTION(aDocListener, "null aDocListener"); *aDocListener = new ImageListener(this); if (!*aDocListener)
nsImageDocument::StartDocumentLoad(const char*         aCommand,                                   nsIChannel*         aChannel,                                   nsILoadGroup*       aLoadGroup,                                   nsISupports*        aContainer,                                   nsIStreamListener** aDocListener,                                   PRBool              aReset,                                   nsIContentSink*     aSink){  nsresult rv =    nsMediaDocument::StartDocumentLoad(aCommand, aChannel, aLoadGroup,                                       aContainer, aDocListener, aReset,                                       aSink);  if (NS_FAILED(rv)) {    return rv;  }  mStreamListener = new ImageListener(this);  if (!mStreamListener)    return NS_ERROR_OUT_OF_MEMORY;  NS_ASSERTION(aDocListener, "null aDocListener");  NS_ADDREF(*aDocListener = mStreamListener);  return NS_OK;}