Bug 658876 - nsHttpChannel.mAsyncOpenTime should be set after mLoadGroup->AddRequest, r=cbiesinger

This commit is contained in:
Honza Bambas 2011-05-23 16:38:24 +02:00
Родитель c4d414dff8
Коммит 44b47c4de7
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -3651,9 +3651,6 @@ nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context)
if (mCanceled)
return mStatus;
if (mTimingEnabled)
mAsyncOpenTime = mozilla::TimeStamp::Now();
rv = NS_CheckPortSafety(mURI);
if (NS_FAILED(rv))
return rv;
@ -3700,6 +3697,12 @@ nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context)
if (mLoadGroup)
mLoadGroup->AddRequest(this, nsnull);
// Collect mAsyncOpenTime after we have called all obsrevers like
// "http-on-modify-request" and load group observers that may set
// mTimingEnabled flag.
if (mTimingEnabled)
mAsyncOpenTime = mozilla::TimeStamp::Now();
// We may have been cancelled already, either by on-modify-request
// listeners or by load group observers; in that case, we should
// not send the request to the server