NS_ASSERTION(aInstancePtrResult, "null out param");
nsresult rv; nsIHTMLStyleSheet* sheet; if (NS_FAILED(rv = NS_NewHTMLStyleSheet(&sheet))) return rv;
NS_NewHTMLStyleSheet(nsIHTMLStyleSheet** aInstancePtrResult){  NS_ASSERTION(aInstancePtrResult, "null out param");  HTMLStyleSheetImpl *it = new HTMLStyleSheetImpl();  if (!it) {    *aInstancePtrResult = nsnull;    return NS_ERROR_OUT_OF_MEMORY;  }  NS_ADDREF(it);  nsresult rv = it->Init();  if (NS_FAILED(rv))    NS_RELEASE(it);  *aInstancePtrResult = it; // NS_ADDREF above, or set to null by NS_RELEASE  return rv;}