Lines Matching refs:gInstance

25     MutexAutoLock lock(nsDeleteDir::gInstance->mLock);  in Run()
26 nsDeleteDir::gInstance->mNotified = true; in Run()
27 nsDeleteDir::gInstance->mCondVar.Notify(); in Run()
32 nsDeleteDir* nsDeleteDir::gInstance = nullptr; member in nsDeleteDir
36 NS_ASSERTION(gInstance == nullptr, "multiple nsCacheService instances!"); in nsDeleteDir()
39 nsDeleteDir::~nsDeleteDir() { gInstance = nullptr; } in ~nsDeleteDir()
42 if (gInstance) return NS_ERROR_ALREADY_INITIALIZED; in Init()
44 gInstance = new nsDeleteDir(); in Init()
49 if (!gInstance) return NS_ERROR_NOT_INITIALIZED; in Shutdown()
54 MutexAutoLock lock(gInstance->mLock); in Shutdown()
55 NS_ASSERTION(!gInstance->mShutdownPending, in Shutdown()
57 gInstance->mShutdownPending = true; in Shutdown()
59 if (!finishDeleting) gInstance->mStopDeleting = true; in Shutdown()
62 for (int32_t i = gInstance->mTimers.Count(); i > 0; i--) { in Shutdown()
63 nsCOMPtr<nsITimer> timer = gInstance->mTimers[i - 1]; in Shutdown()
64 gInstance->mTimers.RemoveObjectAt(i - 1); in Shutdown()
76 eventTarget.swap(gInstance->mBackgroundET); in Shutdown()
87 gInstance->mNotified = false; in Shutdown()
88 while (!gInstance->mNotified) { in Shutdown()
89 gInstance->mCondVar.Wait(); in Shutdown()
94 delete gInstance; in Shutdown()
130 MutexAutoLock lock(gInstance->mLock); in TimerCallback()
132 int32_t idx = gInstance->mTimers.IndexOf(aTimer); in TimerCallback()
138 gInstance->mTimers.RemoveObjectAt(idx); in TimerCallback()
153 gInstance->RemoveDir((*dirList)[i], &shuttingDown); in TimerCallback()
158 MutexAutoLock lock(gInstance->mLock); in TimerCallback()
159 gInstance->DestroyThread(); in TimerCallback()
167 if (!gInstance) return NS_ERROR_NOT_INITIALIZED; in DeleteDir()
224 rv = gInstance->PostTimer(arg.get(), delay); in DeleteDir()
261 if (!gInstance) return NS_ERROR_NOT_INITIALIZED; in RemoveOldTrashes()
301 rv = gInstance->PostTimer(dirList.get(), 90000); in RemoveOldTrashes()