Bug 1156407 - part 3 - get rid of NS_NewTimer; r=mccr8

It's never called.  We could replace a few do_CreateInstance/InitWithFuncCallback
pairs with NS_NewTimer, but I don't think it's worth doing that ahead of a "stop
using do_CreateInstance for all timer instances" effort.
This commit is contained in:
Nathan Froyd 2015-04-20 14:21:01 -04:00
parent f766fa351e
commit 57f644810c
2 changed files with 1 additions and 20 deletions

View File

@ -819,22 +819,3 @@ nsTimerImpl::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
return aMallocSizeOf(this);
}
// NOT FOR PUBLIC CONSUMPTION!
nsresult
NS_NewTimer(nsITimer** aResult, nsTimerCallbackFunc aCallback, void* aClosure,
uint32_t aDelay, uint32_t aType)
{
nsTimerImpl* timer = new nsTimerImpl();
NS_ADDREF(timer);
nsresult rv = timer->InitWithFuncCallback(aCallback, aClosure,
aDelay, aType);
if (NS_FAILED(rv)) {
NS_RELEASE(timer);
return rv;
}
*aResult = timer;
return NS_OK;
}

View File

@ -129,7 +129,7 @@ private:
// timer is firing.
nsCOMPtr<nsITimerCallback> mTimerCallbackWhileFiring;
// These members are set by Init (called from NS_NewTimer) and never reset.
// These members are set by Init and never reset.
CallbackType mCallbackType;
// These members are set by the initiating thread, when the timer's type is