Reinstate the performance timing code removed in error.
This commit is contained in:
parent
a371672f3d
commit
ddc46a5146
|
@ -107,6 +107,9 @@ nsLoadGroup::nsLoadGroup(nsISupports* outer)
|
||||||
, mStatus(NS_OK)
|
, mStatus(NS_OK)
|
||||||
, mPriority(PRIORITY_NORMAL)
|
, mPriority(PRIORITY_NORMAL)
|
||||||
, mIsCanceling(false)
|
, mIsCanceling(false)
|
||||||
|
, mDefaultLoadIsTimed(false)
|
||||||
|
, mTimedRequests(0)
|
||||||
|
, mCachedRequests(0)
|
||||||
, mTimedNonCachedRequestsUntilOnEndPageLoad(0)
|
, mTimedNonCachedRequestsUntilOnEndPageLoad(0)
|
||||||
{
|
{
|
||||||
NS_INIT_AGGREGATED(outer);
|
NS_INIT_AGGREGATED(outer);
|
||||||
|
@ -427,6 +430,12 @@ nsLoadGroup::SetDefaultLoadRequest(nsIRequest *aRequest)
|
||||||
// in particular, nsIChannel::LOAD_DOCUMENT_URI...
|
// in particular, nsIChannel::LOAD_DOCUMENT_URI...
|
||||||
//
|
//
|
||||||
mLoadFlags &= nsIRequest::LOAD_REQUESTMASK;
|
mLoadFlags &= nsIRequest::LOAD_REQUESTMASK;
|
||||||
|
|
||||||
|
nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(aRequest);
|
||||||
|
mDefaultLoadIsTimed = timedChannel != nullptr;
|
||||||
|
if (mDefaultLoadIsTimed) {
|
||||||
|
timedChannel->SetTimingEnabled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Else, do not change the group's load flags (see bug 95981)
|
// Else, do not change the group's load flags (see bug 95981)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -481,6 +490,10 @@ nsLoadGroup::AddRequest(nsIRequest *request, nsISupports* ctxt)
|
||||||
if (mPriority != 0)
|
if (mPriority != 0)
|
||||||
RescheduleRequest(request, mPriority);
|
RescheduleRequest(request, mPriority);
|
||||||
|
|
||||||
|
nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(request);
|
||||||
|
if (timedChannel)
|
||||||
|
timedChannel->SetTimingEnabled(true);
|
||||||
|
|
||||||
if (!(flags & nsIRequest::LOAD_BACKGROUND)) {
|
if (!(flags & nsIRequest::LOAD_BACKGROUND)) {
|
||||||
// Update the count of foreground URIs..
|
// Update the count of foreground URIs..
|
||||||
mForegroundCount += 1;
|
mForegroundCount += 1;
|
||||||
|
|
|
@ -82,6 +82,10 @@ protected:
|
||||||
int32_t mPriority;
|
int32_t mPriority;
|
||||||
bool mIsCanceling;
|
bool mIsCanceling;
|
||||||
|
|
||||||
|
bool mDefaultLoadIsTimed;
|
||||||
|
uint32_t mTimedRequests;
|
||||||
|
uint32_t mCachedRequests;
|
||||||
|
|
||||||
/* For nsPILoadGroupInternal */
|
/* For nsPILoadGroupInternal */
|
||||||
uint32_t mTimedNonCachedRequestsUntilOnEndPageLoad;
|
uint32_t mTimedNonCachedRequestsUntilOnEndPageLoad;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue