rv = NS_NewURIWithDocumentCharset(aAbsURI, aSpec, aDocument, aBaseURI);
rv = nsContentUtils::NewURIWithDocumentCharset(aAbsURI, aSpec, aDocument, aBaseURI);
static nsresult CheckLoadURI(const nsString& aSpec, nsIURI *aBaseURI,                             nsIDocument* aDocument, nsIURI **aAbsURI){  *aAbsURI = nsnull;  nsresult rv;  rv = NS_NewURIWithDocumentCharset(aAbsURI, aSpec, aDocument, aBaseURI);  if (NS_SUCCEEDED(rv)) {    nsCOMPtr<nsIScriptSecurityManager> securityManager =              do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);    if (NS_SUCCEEDED(rv)) {      rv = securityManager->CheckLoadURI(aBaseURI, *aAbsURI,                                         nsIScriptSecurityManager::DISALLOW_FROM_MAIL);    }  }  if (NS_FAILED(rv)) {    NS_IF_RELEASE(*aAbsURI);  }  return rv;}