mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Backed out changeset 3a1f27080f9c (bug 906811) for Linux mochitest failures.
This commit is contained in:
parent
1965b55de6
commit
675c5a5a39
@ -219,11 +219,8 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// Number of active documents currently loading.
|
||||
// More properly "the number of documents that are loading that were active when
|
||||
// they started loading" because we don't change this number if a document
|
||||
// becomes inactive while loading.
|
||||
static int32_t gNumberOfActiveDocumentsLoading = 0;
|
||||
// Number of documents currently loading
|
||||
static int32_t gNumberOfDocumentsLoading = 0;
|
||||
|
||||
// Global count of existing docshells.
|
||||
static int32_t gDocShellCount = 0;
|
||||
@ -786,7 +783,6 @@ nsDocShell::nsDocShell():
|
||||
mInEnsureScriptEnv(false),
|
||||
#endif
|
||||
mAffectPrivateSessionLifetime(true),
|
||||
mTurnOffFavorPerfMode(false),
|
||||
mFrameType(eFrameTypeRegular),
|
||||
mOwnOrContainingAppId(nsIScriptSecurityManager::UNKNOWN_APP_ID),
|
||||
mParentCharsetSource(0)
|
||||
@ -6720,9 +6716,8 @@ nsDocShell::EndPageLoad(nsIWebProgress * aProgress,
|
||||
// If all documents have completed their loading
|
||||
// favor native event dispatch priorities
|
||||
// over performance
|
||||
if (mTurnOffFavorPerfMode && --gNumberOfActiveDocumentsLoading == 0) {
|
||||
if (--gNumberOfDocumentsLoading == 0) {
|
||||
// Hint to use normal native event dispatch priorities
|
||||
mTurnOffFavorPerfMode = false;
|
||||
FavorPerformanceHint(false);
|
||||
}
|
||||
}
|
||||
@ -7727,12 +7722,8 @@ nsDocShell::RestoreFromHistory()
|
||||
|
||||
// Tell the event loop to favor plevents over user events, see comments
|
||||
// in CreateContentViewer.
|
||||
if (mIsActive) {
|
||||
mTurnOffFavorPerfMode = true;
|
||||
if (++gNumberOfActiveDocumentsLoading == 1) {
|
||||
FavorPerformanceHint(true);
|
||||
}
|
||||
}
|
||||
if (++gNumberOfDocumentsLoading == 1)
|
||||
FavorPerformanceHint(true);
|
||||
|
||||
|
||||
if (oldMUDV && newMUDV) {
|
||||
@ -8133,14 +8124,11 @@ nsDocShell::CreateContentViewer(const char *aContentType,
|
||||
// Give hint to native plevent dispatch mechanism. If a document
|
||||
// is loading the native plevent dispatch mechanism should favor
|
||||
// performance over normal native event dispatch priorities.
|
||||
if (mIsActive) {
|
||||
if (++gNumberOfDocumentsLoading == 1) {
|
||||
// Hint to favor performance for the plevent notification mechanism.
|
||||
// We want the pages to load as fast as possible even if its means
|
||||
// native messages might be starved.
|
||||
mTurnOffFavorPerfMode = true;
|
||||
if (++gNumberOfActiveDocumentsLoading == 1) {
|
||||
FavorPerformanceHint(true);
|
||||
}
|
||||
FavorPerformanceHint(true);
|
||||
}
|
||||
|
||||
if (onLocationChangeNeeded) {
|
||||
|
@ -854,7 +854,6 @@ protected:
|
||||
bool mInEnsureScriptEnv;
|
||||
#endif
|
||||
bool mAffectPrivateSessionLifetime;
|
||||
bool mTurnOffFavorPerfMode;
|
||||
uint64_t mHistoryID;
|
||||
|
||||
static nsIURIFixup *sURIFixup;
|
||||
|
Loading…
Reference in New Issue
Block a user