if (rv == NS_OK)
if (NS_SUCCEEDED(rv))
NS_IMETHODIMP nsPluginInstanceOwner::GetDocumentBase(const char* *result){  NS_ENSURE_ARG_POINTER(result);  nsresult rv = NS_OK;  if (mDocumentBase.IsEmpty()) {    if (nsnull == mContext) {      *result = nsnull;      return NS_ERROR_FAILURE;    }        rv = mContext->PresShell()->GetDocument()->GetBaseURI()->GetSpec(mDocumentBase);  }  if (rv == NS_OK)    *result = ToNewCString(mDocumentBase);  return rv;}