Bug 1404198: Part 2b - Switch to NS_NewTimer* in xpcom. r=njn

MozReview-Commit-ID: BEtHEpOmT1E
This commit is contained in:
Kris Maglione
2017-10-15 23:11:22 -07:00
parent 67ea625fca
commit f0246b2f9c
11 changed files with 49 additions and 101 deletions

View File

@@ -1736,13 +1736,9 @@ nsMemoryReporterManager::StartGettingReports()
}
if (!s->mChildrenPending.IsEmpty()) {
nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID);
// Don't use NS_ENSURE_* here; can't return until the report is finished.
if (NS_WARN_IF(!timer)) {
FinishReporting();
return NS_ERROR_FAILURE;
}
rv = timer->InitWithNamedFuncCallback(
nsCOMPtr<nsITimer> timer;
rv = NS_NewTimerWithFuncCallback(
getter_AddRefs(timer),
TimeoutCallback,
this,
kTimeoutLengthMS,