Loading build/automation.py.in +1 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ user_pref("security.default_personal_cert", "Select Automatically"); // Need to user_pref("network.http.prompt-temp-redirect", false); user_pref("svg.smil.enabled", true); // Needed for SMIL mochitests until bug 482402 lands user_pref("media.cache_size", 100); user_pref("security.warn_viewing_mixed", false); user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others """ Loading security/manager/ssl/tests/mochitest/Makefile.in +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ VPATH = @srcdir@ MODULE = pipnss DIRS = \ bugs \ mixedcontent \ $(NULL) # mixedcontent \ Need re-review, occasionally fail and probably collide with other tests include $(topsrcdir)/config/rules.mk uriloader/base/nsDocLoader.cpp +111 −101 Original line number Diff line number Diff line Loading @@ -495,18 +495,18 @@ nsDocLoader::OnStartRequest(nsIRequest *request, nsISupports *aCtxt) ClearInternalProgress(); // only clear our progress if we are starting a new load.... } // // Only fire an OnStartDocumentLoad(...) if the document loader // has initiated a load... Otherwise, this notification has // resulted from a request being added to the load group. // if (mIsLoadingDocument) { // // Create a new nsRequestInfo for the request that is starting to // load... // AddRequestInfo(request); // // Only fire a doStartDocumentLoad(...) if the document loader // has initiated a load... Otherwise, this notification has // resulted from a request being added to the load group. // if (mIsLoadingDocument) { if (loadFlags & nsIChannel::LOAD_DOCUMENT_URI) { // // Make sure that the document channel is null at this point... Loading @@ -533,10 +533,6 @@ nsDocLoader::OnStartRequest(nsIRequest *request, nsISupports *aCtxt) } } } else { // The DocLoader is not busy, so clear out any cached information... ClearRequestInfoHash(); } NS_ASSERTION(!mIsLoadingDocument || mDocumentRequest, "mDocumentRequest MUST be set for the duration of a page load!"); Loading Loading @@ -570,11 +566,6 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, } #endif // // Only fire the OnEndDocumentLoad(...) if the document loader // has initiated a load... // if (mIsLoadingDocument) { PRBool bFireTransferring = PR_FALSE; // Loading @@ -588,6 +579,7 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, nsInt64 oldMax = info->mMaxProgress; info->mMaxProgress = info->mCurrentProgress; // // If a request whose content-length was previously unknown has just // finished loading, then use this new data to try to calculate a Loading @@ -597,6 +589,11 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, mMaxSelfProgress = CalculateMaxProgress(); } // As we know the total progress of this request now, save it to be part // of CalculateMaxProgress() result. We need to remove the info from the // hash, see bug 480713. mCompletedTotalProgress += info->mMaxProgress; // // Determine whether a STATE_TRANSFERRING notification should be // 'synthesized'. Loading Loading @@ -669,17 +666,19 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, // // Fire the OnStateChange(...) notification for stop request // // XXXbz can we just combine these notifications with the else case? Or // can it happen that mIsLoadingDocument is false when we enter this method // but becomes true after the doStartURLLoad call, in which case we may not // want to call DocLoaderIsEmpty if we're really empty? doStopURLLoad(aRequest, aStatus); // Clear this request out of the hash to avoid bypass of FireOnStateChange // when address of the request is reused. RemoveRequestInfo(aRequest); // // Only fire the DocLoaderIsEmpty(...) if the document loader has initiated a // load. This will handle removing the request from our hashtable as needed. // if (mIsLoadingDocument) { DocLoaderIsEmpty(PR_TRUE); } else { doStopURLLoad(aRequest, aStatus); } return NS_OK; } Loading Loading @@ -745,6 +744,10 @@ void nsDocLoader::DocLoaderIsEmpty(PRBool aFlushLayout) // And now check whether we're really busy; that might have changed with // the layout flush. if (!IsBusy()) { // Clear out our request info hash, now that our load really is done and // we don't need it anymore to CalculateMaxProgress(). ClearInternalProgress(); PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: Is now idle...\n", this)); Loading Loading @@ -1097,6 +1100,7 @@ NS_IMETHODIMP nsDocLoader::OnStatus(nsIRequest* aRequest, nsISupports* ctxt, if (info->mUploading != uploading) { mCurrentSelfProgress = mMaxSelfProgress = LL_ZERO; mCurrentTotalProgress = mMaxTotalProgress = LL_ZERO; mCompletedTotalProgress = LL_ZERO; info->mUploading = uploading; info->mCurrentProgress = LL_ZERO; info->mMaxProgress = LL_ZERO; Loading @@ -1120,6 +1124,7 @@ void nsDocLoader::ClearInternalProgress() mCurrentSelfProgress = mMaxSelfProgress = LL_ZERO; mCurrentTotalProgress = mMaxTotalProgress = LL_ZERO; mCompletedTotalProgress = LL_ZERO; mProgressStateFlags = nsIWebProgressListener::STATE_STOP; } Loading Loading @@ -1436,6 +1441,11 @@ nsresult nsDocLoader::AddRequestInfo(nsIRequest *aRequest) return NS_OK; } void nsDocLoader::RemoveRequestInfo(nsIRequest *aRequest) { PL_DHashTableOperate(&mRequestInfoHash, aRequest, PL_DHASH_REMOVE); } nsRequestInfo * nsDocLoader::GetRequestInfo(nsIRequest *aRequest) { nsRequestInfo *info = Loading Loading @@ -1495,7 +1505,7 @@ CalcMaxProgressCallback(PLDHashTable *table, PLDHashEntryHdr *hdr, PRInt64 nsDocLoader::CalculateMaxProgress() { nsInt64 max = 0; nsInt64 max = mCompletedTotalProgress; PL_DHashTableEnumerate(&mRequestInfoHash, CalcMaxProgressCallback, &max); return max; } Loading uriloader/base/nsDocLoader.h +2 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,7 @@ protected: nsInt64 mMaxTotalProgress; PLDHashTable mRequestInfoHash; nsInt64 mCompletedTotalProgress; /* * This flag indicates that the loader is loading a document. It is set Loading Loading @@ -267,6 +268,7 @@ private: PRInt64 GetMaxTotalProgress(); nsresult AddRequestInfo(nsIRequest* aRequest); void RemoveRequestInfo(nsIRequest* aRequest); nsRequestInfo *GetRequestInfo(nsIRequest* aRequest); void ClearRequestInfoHash(); PRInt64 CalculateMaxProgress(); Loading Loading
build/automation.py.in +1 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ user_pref("security.default_personal_cert", "Select Automatically"); // Need to user_pref("network.http.prompt-temp-redirect", false); user_pref("svg.smil.enabled", true); // Needed for SMIL mochitests until bug 482402 lands user_pref("media.cache_size", 100); user_pref("security.warn_viewing_mixed", false); user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others """ Loading
security/manager/ssl/tests/mochitest/Makefile.in +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ VPATH = @srcdir@ MODULE = pipnss DIRS = \ bugs \ mixedcontent \ $(NULL) # mixedcontent \ Need re-review, occasionally fail and probably collide with other tests include $(topsrcdir)/config/rules.mk
uriloader/base/nsDocLoader.cpp +111 −101 Original line number Diff line number Diff line Loading @@ -495,18 +495,18 @@ nsDocLoader::OnStartRequest(nsIRequest *request, nsISupports *aCtxt) ClearInternalProgress(); // only clear our progress if we are starting a new load.... } // // Only fire an OnStartDocumentLoad(...) if the document loader // has initiated a load... Otherwise, this notification has // resulted from a request being added to the load group. // if (mIsLoadingDocument) { // // Create a new nsRequestInfo for the request that is starting to // load... // AddRequestInfo(request); // // Only fire a doStartDocumentLoad(...) if the document loader // has initiated a load... Otherwise, this notification has // resulted from a request being added to the load group. // if (mIsLoadingDocument) { if (loadFlags & nsIChannel::LOAD_DOCUMENT_URI) { // // Make sure that the document channel is null at this point... Loading @@ -533,10 +533,6 @@ nsDocLoader::OnStartRequest(nsIRequest *request, nsISupports *aCtxt) } } } else { // The DocLoader is not busy, so clear out any cached information... ClearRequestInfoHash(); } NS_ASSERTION(!mIsLoadingDocument || mDocumentRequest, "mDocumentRequest MUST be set for the duration of a page load!"); Loading Loading @@ -570,11 +566,6 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, } #endif // // Only fire the OnEndDocumentLoad(...) if the document loader // has initiated a load... // if (mIsLoadingDocument) { PRBool bFireTransferring = PR_FALSE; // Loading @@ -588,6 +579,7 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, nsInt64 oldMax = info->mMaxProgress; info->mMaxProgress = info->mCurrentProgress; // // If a request whose content-length was previously unknown has just // finished loading, then use this new data to try to calculate a Loading @@ -597,6 +589,11 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, mMaxSelfProgress = CalculateMaxProgress(); } // As we know the total progress of this request now, save it to be part // of CalculateMaxProgress() result. We need to remove the info from the // hash, see bug 480713. mCompletedTotalProgress += info->mMaxProgress; // // Determine whether a STATE_TRANSFERRING notification should be // 'synthesized'. Loading Loading @@ -669,17 +666,19 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, // // Fire the OnStateChange(...) notification for stop request // // XXXbz can we just combine these notifications with the else case? Or // can it happen that mIsLoadingDocument is false when we enter this method // but becomes true after the doStartURLLoad call, in which case we may not // want to call DocLoaderIsEmpty if we're really empty? doStopURLLoad(aRequest, aStatus); // Clear this request out of the hash to avoid bypass of FireOnStateChange // when address of the request is reused. RemoveRequestInfo(aRequest); // // Only fire the DocLoaderIsEmpty(...) if the document loader has initiated a // load. This will handle removing the request from our hashtable as needed. // if (mIsLoadingDocument) { DocLoaderIsEmpty(PR_TRUE); } else { doStopURLLoad(aRequest, aStatus); } return NS_OK; } Loading Loading @@ -745,6 +744,10 @@ void nsDocLoader::DocLoaderIsEmpty(PRBool aFlushLayout) // And now check whether we're really busy; that might have changed with // the layout flush. if (!IsBusy()) { // Clear out our request info hash, now that our load really is done and // we don't need it anymore to CalculateMaxProgress(). ClearInternalProgress(); PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: Is now idle...\n", this)); Loading Loading @@ -1097,6 +1100,7 @@ NS_IMETHODIMP nsDocLoader::OnStatus(nsIRequest* aRequest, nsISupports* ctxt, if (info->mUploading != uploading) { mCurrentSelfProgress = mMaxSelfProgress = LL_ZERO; mCurrentTotalProgress = mMaxTotalProgress = LL_ZERO; mCompletedTotalProgress = LL_ZERO; info->mUploading = uploading; info->mCurrentProgress = LL_ZERO; info->mMaxProgress = LL_ZERO; Loading @@ -1120,6 +1124,7 @@ void nsDocLoader::ClearInternalProgress() mCurrentSelfProgress = mMaxSelfProgress = LL_ZERO; mCurrentTotalProgress = mMaxTotalProgress = LL_ZERO; mCompletedTotalProgress = LL_ZERO; mProgressStateFlags = nsIWebProgressListener::STATE_STOP; } Loading Loading @@ -1436,6 +1441,11 @@ nsresult nsDocLoader::AddRequestInfo(nsIRequest *aRequest) return NS_OK; } void nsDocLoader::RemoveRequestInfo(nsIRequest *aRequest) { PL_DHashTableOperate(&mRequestInfoHash, aRequest, PL_DHASH_REMOVE); } nsRequestInfo * nsDocLoader::GetRequestInfo(nsIRequest *aRequest) { nsRequestInfo *info = Loading Loading @@ -1495,7 +1505,7 @@ CalcMaxProgressCallback(PLDHashTable *table, PLDHashEntryHdr *hdr, PRInt64 nsDocLoader::CalculateMaxProgress() { nsInt64 max = 0; nsInt64 max = mCompletedTotalProgress; PL_DHashTableEnumerate(&mRequestInfoHash, CalcMaxProgressCallback, &max); return max; } Loading
uriloader/base/nsDocLoader.h +2 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,7 @@ protected: nsInt64 mMaxTotalProgress; PLDHashTable mRequestInfoHash; nsInt64 mCompletedTotalProgress; /* * This flag indicates that the loader is loading a document. It is set Loading Loading @@ -267,6 +268,7 @@ private: PRInt64 GetMaxTotalProgress(); nsresult AddRequestInfo(nsIRequest* aRequest); void RemoveRequestInfo(nsIRequest* aRequest); nsRequestInfo *GetRequestInfo(nsIRequest* aRequest); void ClearRequestInfoHash(); PRInt64 CalculateMaxProgress(); Loading