if (aInstancePtrResult == nsnull) { return NS_ERROR_NULL_POINTER;
nsresult rv; nsIHTMLStyleSheet* sheet; if (NS_FAILED(rv = NS_NewHTMLStyleSheet(&sheet))) return rv;  if (NS_FAILED(rv = sheet->Init(aURL, aDocument))) { NS_RELEASE(sheet); return rv;
NS_NewHTMLStyleSheet(nsIHTMLStyleSheet** aInstancePtrResult){  if (aInstancePtrResult == nsnull) {    return NS_ERROR_NULL_POINTER;  }  HTMLStyleSheetImpl  *it = new HTMLStyleSheetImpl();  if (nsnull == it) {    return NS_ERROR_OUT_OF_MEMORY;  }  NS_ADDREF(it);  *aInstancePtrResult = it;  return NS_OK;}