NS_PRECONDITION(aResult != nsnull, "null ptr"); if (! aResult) return NS_ERROR_NULL_POINTER;
NS_ENSURE_ARG_POINTER(aResult);
NS_NewRange(nsIDOMRange** aResult){  NS_PRECONDITION(aResult != nsnull, "null ptr");  if (! aResult)    return NS_ERROR_NULL_POINTER;  nsRange * range = new nsRange();  if (range)    return range->QueryInterface(NS_GET_IID(nsIDOMRange), (void**) aResult);  return NS_ERROR_OUT_OF_MEMORY;}