зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1688937 - Remove now-unused thread counting r=KrisWright
Depends on D103190 Differential Revision: https://phabricator.services.mozilla.com/D103191
This commit is contained in:
Родитель
41cd32c04d
Коммит
b98fffa595
|
@ -114,9 +114,6 @@ NS_DECL_CI_INTERFACE_GETTER(nsThread)
|
|||
|
||||
Array<char, nsThread::kRunnableNameBufSize> nsThread::sMainThreadRunnableName;
|
||||
|
||||
uint32_t nsThread::sActiveThreads;
|
||||
uint32_t nsThread::sMaxActiveThreads;
|
||||
|
||||
#ifdef EARLY_BETA_OR_EARLIER
|
||||
const uint32_t kTelemetryWakeupCountLimit = 100;
|
||||
#endif
|
||||
|
@ -335,26 +332,16 @@ void nsThread::ClearThreadList() {
|
|||
/* static */
|
||||
nsThreadEnumerator nsThread::Enumerate() { return {}; }
|
||||
|
||||
/* static */
|
||||
uint32_t nsThread::MaxActiveThreads() {
|
||||
OffTheBooksMutexAutoLock mal(ThreadListMutex());
|
||||
return sMaxActiveThreads;
|
||||
}
|
||||
|
||||
void nsThread::AddToThreadList() {
|
||||
OffTheBooksMutexAutoLock mal(ThreadListMutex());
|
||||
MOZ_ASSERT(!isInList());
|
||||
|
||||
sActiveThreads++;
|
||||
sMaxActiveThreads = std::max(sActiveThreads, sMaxActiveThreads);
|
||||
|
||||
ThreadList().insertBack(this);
|
||||
}
|
||||
|
||||
void nsThread::MaybeRemoveFromThreadList() {
|
||||
OffTheBooksMutexAutoLock mal(ThreadListMutex());
|
||||
if (isInList()) {
|
||||
sActiveThreads--;
|
||||
removeFrom(ThreadList());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,8 +238,6 @@ class nsThread : public nsIThreadInternal,
|
|||
|
||||
static nsThreadEnumerator Enumerate();
|
||||
|
||||
static uint32_t MaxActiveThreads();
|
||||
|
||||
// When entering local execution mode a new event queue is created and used as
|
||||
// an event source. This queue is only accessible through an
|
||||
// nsLocalExecutionGuard constructed from the nsLocalExecutionRecord returned
|
||||
|
@ -288,11 +286,6 @@ class nsThread : public nsIThreadInternal,
|
|||
static mozilla::LinkedList<nsThread>& ThreadList();
|
||||
static void ClearThreadList();
|
||||
|
||||
// The current number of active threads.
|
||||
static uint32_t sActiveThreads;
|
||||
// The maximum current number of active threads we've had in this session.
|
||||
static uint32_t sMaxActiveThreads;
|
||||
|
||||
void AddToThreadList();
|
||||
void MaybeRemoveFromThreadList();
|
||||
|
||||
|
|
|
@ -768,10 +768,6 @@ nsThreadManager::GetMainThreadEventTarget(nsIEventTarget** aTarget) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
uint32_t nsThreadManager::GetHighestNumberOfThreads() {
|
||||
return nsThread::MaxActiveThreads();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsThreadManager::DispatchToMainThread(nsIRunnable* aEvent, uint32_t aPriority,
|
||||
uint8_t aArgc) {
|
||||
|
|
|
@ -68,10 +68,6 @@ class nsThreadManager : public nsIThreadManager {
|
|||
already_AddRefed<nsISerialEventTarget> CreateBackgroundTaskQueue(
|
||||
const char* aName);
|
||||
|
||||
// Returns the maximal number of threads that have been in existence
|
||||
// simultaneously during the execution of the thread manager.
|
||||
uint32_t GetHighestNumberOfThreads();
|
||||
|
||||
~nsThreadManager();
|
||||
|
||||
void EnableMainThreadEventPrioritization();
|
||||
|
|
Загрузка…
Ссылка в новой задаче