Bug 106533. Active Accessibility: Assert on startup in timer code. r=evaughan, sr=waterson

This commit is contained in:
aaronl%netscape.com 2001-10-31 06:12:39 +00:00
parent 4cdecde266
commit deeb2568c9
2 changed files with 10 additions and 8 deletions

View File

@ -212,11 +212,12 @@ void nsRootAccessible::Notify(nsITimer *timer)
NS_IMETHODIMP nsRootAccessible::StartDocReadyTimer()
{
nsresult rv;
if (!mTimer)
if (!mTimer) {
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
if (NS_SUCCEEDED(rv)) {
const PRUint32 kUpdateTimerDelay = 1;
rv = mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
if (NS_SUCCEEDED(rv)) {
const PRUint32 kUpdateTimerDelay = 1;
rv = mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
}
}
return rv;

View File

@ -212,11 +212,12 @@ void nsRootAccessible::Notify(nsITimer *timer)
NS_IMETHODIMP nsRootAccessible::StartDocReadyTimer()
{
nsresult rv;
if (!mTimer)
if (!mTimer) {
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
if (NS_SUCCEEDED(rv)) {
const PRUint32 kUpdateTimerDelay = 1;
rv = mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
if (NS_SUCCEEDED(rv)) {
const PRUint32 kUpdateTimerDelay = 1;
rv = mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this), kUpdateTimerDelay);
}
}
return rv;