else { nsCAutoString resultBuf; if (spec.IsEmpty()) rv = baseURI->GetSpec(resultBuf); else rv = baseURI->Resolve(NS_ConvertUCS2toUTF8(spec), resultBuf); if (NS_SUCCEEDED(rv)) CopyUTF8toUTF16(resultBuf, result); }
else if (spec.IsEmpty()) rv = baseURI->GetSpec(result); else rv = baseURI->Resolve(spec, result);
NS_MakeAbsoluteURI(nsAString       &result,                   const nsAString &spec,                    nsIURI          *baseURI,                   nsIIOService    *unused = nsnull){    nsresult rv;    if (!baseURI) {        NS_WARNING("It doesn't make sense to not supply a base URI");        result = spec;        rv = NS_OK;    }    else {        nsCAutoString resultBuf;        if (spec.IsEmpty())            rv = baseURI->GetSpec(resultBuf);        else            rv = baseURI->Resolve(NS_ConvertUCS2toUTF8(spec), resultBuf);        if (NS_SUCCEEDED(rv))            CopyUTF8toUTF16(resultBuf, result);    }    return rv;}