necko only - extended chrome's make absolute implementation

This commit is contained in:
valeski%netscape.com 1999-07-13 01:37:23 +00:00
Родитель 1da32c6bfe
Коммит 73c1abc20c
2 изменённых файлов: 30 добавлений и 14 удалений

Просмотреть файл

@ -90,13 +90,21 @@ nsChromeProtocolHandler::MakeAbsolute(const char* aSpec,
nsIURI* aBaseURI,
char* *result)
{
// presumably, there's no such thing as a relative about: URI,
// so just copy the input spec
char* dup = nsCRT::strdup(aSpec);
if (dup == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
*result = dup;
return NS_OK;
nsresult rv;
nsIURI* url;
if (aBaseURI)
rv = aBaseURI->Clone(&url);
else
rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull, nsCOMTypeInfo<nsIURI>::GetIID(), (void**)&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
url->GetSpec(result);
NS_RELEASE(url);
return rv;
}
NS_IMETHODIMP

Просмотреть файл

@ -90,13 +90,21 @@ nsChromeProtocolHandler::MakeAbsolute(const char* aSpec,
nsIURI* aBaseURI,
char* *result)
{
// presumably, there's no such thing as a relative about: URI,
// so just copy the input spec
char* dup = nsCRT::strdup(aSpec);
if (dup == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
*result = dup;
return NS_OK;
nsresult rv;
nsIURI* url;
if (aBaseURI)
rv = aBaseURI->Clone(&url);
else
rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull, nsCOMTypeInfo<nsIURI>::GetIID(), (void**)&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
url->GetSpec(result);
NS_RELEASE(url);
return rv;
}
NS_IMETHODIMP