mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 658876 - nsHttpChannel.mAsyncOpenTime should be set after mLoadGroup->AddRequest, r=cbiesinger
This commit is contained in:
parent
c4d414dff8
commit
44b47c4de7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user