return gImageManager->QueryInterface(kIImageManagerIID, (void **)aInstancePtrResult);
return rv;
NS_NewImageManager(nsIImageManager **aInstancePtrResult){  NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");  if (nsnull == aInstancePtrResult) {    return NS_ERROR_NULL_POINTER;  }  if (nsnull == gImageManager) {    gImageManager = new ImageManagerImpl();  }  if (nsnull == gImageManager) {    return NS_ERROR_OUT_OF_MEMORY;  }  return gImageManager->QueryInterface(kIImageManagerIID,                                       (void **)aInstancePtrResult);}