nsresult result = ((nsGfxTextControlFrame*)(*aNewFrame))->InitTextControl(); if (NS_FAILED(result)) {  result = NS_NewNativeTextControlFrame(aNewFrame); } return result;
return NS_OK;
NS_NewGfxTextControlFrame(nsIFrame** aNewFrame){  NS_PRECONDITION(aNewFrame, "null OUT ptr");  if (nsnull == aNewFrame) {    return NS_ERROR_NULL_POINTER;  }  *aNewFrame = new nsGfxTextControlFrame;  if (nsnull == aNewFrame) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsresult result = ((nsGfxTextControlFrame*)(*aNewFrame))->InitTextControl();  if (NS_FAILED(result))  { // can't properly initialized ender, probably it isn't installed    //NS_RELEASE(*aNewFrame); // XXX: need to release allocated ender text frame!    result = NS_NewNativeTextControlFrame(aNewFrame);  }  return result;}