if (NS_FAILED(rv = sheet->Init(aURL, aDocument))) { NS_RELEASE(sheet); return rv;
nsHTMLStyleSheet *it = new nsHTMLStyleSheet(); if (!it) { *aInstancePtrResult = nsnull; return NS_ERROR_OUT_OF_MEMORY;
NS_NewHTMLStyleSheet(nsHTMLStyleSheet** aInstancePtrResult, nsIURI* aURL,                      nsIDocument* aDocument){  nsresult rv;  nsHTMLStyleSheet* sheet;  if (NS_FAILED(rv = NS_NewHTMLStyleSheet(&sheet)))    return rv;  if (NS_FAILED(rv = sheet->Init(aURL, aDocument))) {    NS_RELEASE(sheet);    return rv;  }  *aInstancePtrResult = sheet;  return NS_OK;}