Bug 994090 - Use do_CreateInstance in nsWindowMemoryReport. r=smaug

This commit is contained in:
Andrew McCreight 2014-05-15 09:35:00 -04:00
parent ba123c375e
commit 8d1c981254

View File

@ -688,7 +688,7 @@ nsWindowMemoryReporter::AsyncCheckForGhostWindows()
int32_t timeSinceLastCheck = (TimeStamp::NowLoRes() - mLastCheckForGhostWindows).ToSeconds(); int32_t timeSinceLastCheck = (TimeStamp::NowLoRes() - mLastCheckForGhostWindows).ToSeconds();
int32_t timerDelay = (kTimeBetweenChecks - std::min(timeSinceLastCheck, kTimeBetweenChecks)) * PR_MSEC_PER_SEC; int32_t timerDelay = (kTimeBetweenChecks - std::min(timeSinceLastCheck, kTimeBetweenChecks)) * PR_MSEC_PER_SEC;
CallCreateInstance<nsITimer>("@mozilla.org/timer;1", getter_AddRefs(mCheckTimer)); mCheckTimer = do_CreateInstance("@mozilla.org/timer;1");
if (mCheckTimer) { if (mCheckTimer) {
mCheckTimer->InitWithFuncCallback(CheckTimerFired, nullptr, mCheckTimer->InitWithFuncCallback(CheckTimerFired, nullptr,