NS_PRECONDITION(aResult, "null OUT ptr"); if (!aResult) { return NS_ERROR_NULL_POINTER; } DocumentViewerImpl* it = new DocumentViewerImpl(); if (nsnull == it) { *aResult = nsnull;
*aResult = new DocumentViewerImpl(); if (!*aResult) {
NS_NewDocumentViewer(nsIDocumentViewer** aResult){  NS_PRECONDITION(aResult, "null OUT ptr");  if (!aResult) {    return NS_ERROR_NULL_POINTER;  }  DocumentViewerImpl* it = new DocumentViewerImpl();  if (nsnull == it) {    *aResult = nsnull;    return NS_ERROR_OUT_OF_MEMORY;  }  return CallQueryInterface(it, aResult);}