зеркало из https://github.com/mozilla/pjs.git
fixing IRIX bustage (^M's from mstoltz's checkin)
This commit is contained in:
Родитель
87955f7f58
Коммит
75d0ab7d78
|
@ -154,20 +154,20 @@ nsCodebasePrincipal::GetOrigin(char **origin)
|
|||
{
|
||||
nsresult rv;
|
||||
nsCAutoString hostPort;
|
||||
if (NS_SUCCEEDED(mURI->GetHostPort(hostPort)))
|
||||
{
|
||||
nsCAutoString scheme;
|
||||
rv = mURI->GetScheme(scheme);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_SUCCEEDED(mURI->GetHostPort(hostPort)))
|
||||
{
|
||||
nsCAutoString scheme;
|
||||
rv = mURI->GetScheme(scheme);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
*origin = ToNewCString(scheme + NS_LITERAL_CSTRING("://") + hostPort);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// Some URIs (e.g., nsSimpleURI) don't support host. Just
|
||||
// get the full spec.
|
||||
// get the full spec.
|
||||
nsCAutoString spec;
|
||||
rv = mURI->GetSpec(spec);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = mURI->GetSpec(spec);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
*origin = ToNewCString(spec);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче