*aResult = NULL; if (NULL != aOuter)
*aResult = nsnull; if (aOuter)
static nsresult nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult){  nsresult rv;  nsIScriptableRegion *inst;  if ( NULL == aResult )  {    rv = NS_ERROR_NULL_POINTER;    return rv;  }  *aResult = NULL;  if (NULL != aOuter)  {    rv = NS_ERROR_NO_AGGREGATION;    return rv;  }  // create an nsRegionGtk and get the scriptable region from it  nsCOMPtr <nsIRegion> rgn;  NS_NEWXPCOM(rgn, nsRegionGTK);  if (rgn != nsnull)  {    nsCOMPtr<nsIScriptableRegion> scriptableRgn = new nsScriptableRegion(rgn);    inst = scriptableRgn;  }  if (NULL == inst)  {    rv = NS_ERROR_OUT_OF_MEMORY;    return rv;  }  NS_ADDREF(inst);  rv = inst->QueryInterface(aIID, aResult);  NS_RELEASE(inst);  return rv;}