зеркало из https://github.com/mozilla/gecko-dev.git
r=rhp. datetime protocol wasn't initializing properly which would cause a datetime url without a host to spin
This commit is contained in:
Родитель
d601e1d680
Коммит
e92469cb8e
|
@ -55,9 +55,20 @@ nsDateTimeChannel::Init(const char* verb,
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
NS_ASSERTION(uri, "no uri");
|
||||
|
||||
mOriginalURI = originalURI ? originalURI : uri;
|
||||
mUrl = uri;
|
||||
|
||||
rv = mUrl->GetPort(&mPort);
|
||||
if (NS_FAILED(rv) || mPort < 1)
|
||||
mPort = DATETIME_PORT;
|
||||
|
||||
rv = mUrl->GetPath(getter_Copies(mHost));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (!*(const char *)mHost) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
rv = SetLoadAttributes(loadAttributes);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = SetLoadGroup(aLoadGroup);
|
||||
|
@ -65,12 +76,6 @@ nsDateTimeChannel::Init(const char* verb,
|
|||
rv = SetNotificationCallbacks(notificationCallbacks);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = mUrl->GetPort(&mPort);
|
||||
if (NS_FAILED(rv) || mPort < 1)
|
||||
mPort = DATETIME_PORT;
|
||||
|
||||
rv = mUrl->GetPath(getter_Copies(mHost));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,9 +55,20 @@ nsDateTimeChannel::Init(const char* verb,
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
NS_ASSERTION(uri, "no uri");
|
||||
|
||||
mOriginalURI = originalURI ? originalURI : uri;
|
||||
mUrl = uri;
|
||||
|
||||
rv = mUrl->GetPort(&mPort);
|
||||
if (NS_FAILED(rv) || mPort < 1)
|
||||
mPort = DATETIME_PORT;
|
||||
|
||||
rv = mUrl->GetPath(getter_Copies(mHost));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (!*(const char *)mHost) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
rv = SetLoadAttributes(loadAttributes);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = SetLoadGroup(aLoadGroup);
|
||||
|
@ -65,12 +76,6 @@ nsDateTimeChannel::Init(const char* verb,
|
|||
rv = SetNotificationCallbacks(notificationCallbacks);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = mUrl->GetPort(&mPort);
|
||||
if (NS_FAILED(rv) || mPort < 1)
|
||||
mPort = DATETIME_PORT;
|
||||
|
||||
rv = mUrl->GetPath(getter_Copies(mHost));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче