mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1657841 - Remove unused visible tabs tracking. r=edgar
This stopped being used at some point and now it's just useless. Differential Revision: https://phabricator.services.mozilla.com/D86322
This commit is contained in:
parent
b043933d2f
commit
ac6059e379
@ -4572,8 +4572,7 @@ nsDocShell::SetIsActive(bool aIsActive) {
|
||||
// Tell the nsDOMNavigationTiming about it
|
||||
RefPtr<nsDOMNavigationTiming> timing = mTiming;
|
||||
if (!timing && mContentViewer) {
|
||||
Document* doc = mContentViewer->GetDocument();
|
||||
if (doc) {
|
||||
if (Document* doc = mContentViewer->GetDocument()) {
|
||||
timing = doc->GetNavigationTiming();
|
||||
}
|
||||
}
|
||||
|
@ -160,8 +160,6 @@ NS_IMPL_ISUPPORTS(ContentListener, nsIDOMEventListener)
|
||||
|
||||
static const char BEFORE_FIRST_PAINT[] = "before-first-paint";
|
||||
|
||||
nsTHashtable<nsPtrHashKey<BrowserChild>>* BrowserChild::sVisibleTabs;
|
||||
|
||||
typedef nsDataHashtable<nsUint64HashKey, BrowserChild*> BrowserChildMap;
|
||||
static BrowserChildMap* sBrowserChildren;
|
||||
StaticMutex sBrowserChildrenMutex;
|
||||
@ -943,13 +941,6 @@ void BrowserChild::ActorDestroy(ActorDestroyReason why) {
|
||||
|
||||
BrowserChild::~BrowserChild() {
|
||||
mAnonymousGlobalScopes.Clear();
|
||||
if (sVisibleTabs) {
|
||||
sVisibleTabs->RemoveEntry(this);
|
||||
if (sVisibleTabs->IsEmpty()) {
|
||||
delete sVisibleTabs;
|
||||
sVisibleTabs = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
DestroyWindow();
|
||||
|
||||
@ -2779,11 +2770,6 @@ void BrowserChild::MakeVisible() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sVisibleTabs) {
|
||||
sVisibleTabs = new nsTHashtable<nsPtrHashKey<BrowserChild>>();
|
||||
}
|
||||
sVisibleTabs->PutEntry(this);
|
||||
|
||||
if (mPuppetWidget) {
|
||||
mPuppetWidget->Show(true);
|
||||
}
|
||||
@ -2817,12 +2803,6 @@ void BrowserChild::MakeVisible() {
|
||||
}
|
||||
|
||||
void BrowserChild::MakeHidden() {
|
||||
if (sVisibleTabs) {
|
||||
sVisibleTabs->RemoveEntry(this);
|
||||
// We don't delete sVisibleTabs here when it's empty since that
|
||||
// could cause a lot of churn. Instead, we wait until ~BrowserChild.
|
||||
}
|
||||
|
||||
if (!IsVisible()) {
|
||||
return;
|
||||
}
|
||||
|
@ -664,20 +664,6 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
|
||||
mCancelContentJSEpoch = aEpoch;
|
||||
}
|
||||
|
||||
static bool HasVisibleTabs() {
|
||||
return sVisibleTabs && !sVisibleTabs->IsEmpty();
|
||||
}
|
||||
|
||||
// Returns the set of BrowserChilds that are currently rendering layers. There
|
||||
// can be multiple BrowserChilds in this state if Firefox has multiple windows
|
||||
// open or is warming tabs up. There can also be zero BrowserChilds in this
|
||||
// state. Note that this function should only be called if HasVisibleTabs()
|
||||
// returns true.
|
||||
static const nsTHashtable<nsPtrHashKey<BrowserChild>>& GetVisibleTabs() {
|
||||
MOZ_ASSERT(HasVisibleTabs());
|
||||
return *sVisibleTabs;
|
||||
}
|
||||
|
||||
bool UpdateSessionStore(uint32_t aFlushId, bool aIsFinal = false);
|
||||
|
||||
#ifdef XP_WIN
|
||||
@ -934,12 +920,6 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
|
||||
Maybe<bool> mWindowSupportsProtectedMedia;
|
||||
#endif
|
||||
|
||||
// This state is used to keep track of the current visible tabs (the ones
|
||||
// rendering layers). There may be more than one if there are multiple browser
|
||||
// windows open, or tabs are being warmed up. There may be none if this
|
||||
// process does not host any visible or warming tabs.
|
||||
static nsTHashtable<nsPtrHashKey<BrowserChild>>* sVisibleTabs;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(BrowserChild);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user