if (NS_SUCCEEDED(NS_NewImageNetContext(&net_cx)) && NS_SUCCEEDED(image_req->Init(mGroupContext, aUrl, aObserver, aBackgroundColor, aWidth, aHeight, aFlags, net_cx))) {
result = image_req->Init(mGroupContext, aUrl, aObserver, aBackgroundColor, aWidth, aHeight, aFlags, mNetContext);  if (NS_SUCCEEDED(result)) {
ImageGroupImpl::GetImage(const char* aUrl,                          nsIImageRequestObserver *aObserver,                         const nscolor* aBackgroundColor,                         PRUint32 aWidth, PRUint32 aHeight,                         PRUint32 aFlags){  NS_PRECONDITION(nsnull != aUrl, "null URL");    ImageRequestImpl *image_req = new ImageRequestImpl();  if (image_req != nsnull) {    ilINetContext* net_cx;    // Create an async net context, and ask the image request object    // to get the image    if (NS_SUCCEEDED(NS_NewImageNetContext(&net_cx)) &&        NS_SUCCEEDED(image_req->Init(mGroupContext, aUrl, aObserver, aBackgroundColor,                                     aWidth, aHeight, aFlags, net_cx))) {      NS_ADDREF(image_req);    } else {      delete image_req;      image_req = nsnull;    }  }  return image_req;}