mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
NECKO only: changed string/error handling in NS_MakeAbsoluteURI A: chofmann R: valeski
This commit is contained in:
parent
0954d17559
commit
b0a1bfd2ff
@ -117,10 +117,13 @@ NS_MakeAbsoluteURI(const char* spec, nsIURI* baseURI, char* *result)
|
||||
nsresult
|
||||
NS_MakeAbsoluteURI(const nsString& spec, nsIURI* baseURI, nsString& result)
|
||||
{
|
||||
char* specStr = spec.ToNewCString();
|
||||
char* resultStr;
|
||||
char* specStr = spec.ToNewCString();
|
||||
if (!specStr) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsresult rv = NS_MakeAbsoluteURI(specStr, baseURI, &resultStr);
|
||||
nsCRT::free(specStr);
|
||||
delete [] specStr;
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
result = resultStr;
|
||||
|
Loading…
Reference in New Issue
Block a user