if (NS_FAILED(rv)) { delete it; return rv; }
NS_ENSURE_SUCCESS(rv, rv);
NS_NewHTMLFragmentContentSink(nsIHTMLFragmentContentSink** aResult){  NS_PRECONDITION(nsnull != aResult, "null ptr");  if (nsnull == aResult) {    return NS_ERROR_NULL_POINTER;  }  nsHTMLFragmentContentSink* it;  NS_NEWXPCOM(it, nsHTMLFragmentContentSink);  if (nsnull == it) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsresult rv = it->Init();  if (NS_FAILED(rv)) {    delete it;    return rv;  }  return it->QueryInterface(NS_GET_IID(nsIHTMLFragmentContentSink), (void **)aResult);}