Index: nsGlobalWindow.cpp =================================================================== RCS file: /cvsroot/mozilla/dom/src/base/nsGlobalWindow.cpp,v retrieving revision 1.882 diff -pu -r1.882 nsGlobalWindow.cpp --- nsGlobalWindow.cpp +++ nsGlobalWindow.cpp @@ -6410,7 +6410,7 @@ nsGlobalWindow::RunTimeout(nsTimeout *aT NS_ASSERTION(IsInnerWindow(), "Timeout running on outer window!"); NS_ASSERTION(!IsFrozen(), "Timeout running on a window in the bfcache!"); - nsTimeout *next, *prev, *timeout; + nsTimeout *nextTimeout, *prevTimeout, *timeout; nsTimeout *last_expired_timeout, **last_insertion_point; nsTimeout dummy_timeout; PRUint32 firingDepth = mTimeoutFiringDepth + 1; @@ -6475,15 +6475,15 @@ nsGlobalWindow::RunTimeout(nsTimeout *aT last_insertion_point = mTimeoutInsertionPoint; mTimeoutInsertionPoint = &dummy_timeout.mNext; - prev = nsnull; - for (timeout = mTimeouts; timeout != &dummy_timeout && !IsFrozen(); timeout = next) { - next = timeout->mNext; + prevTimeout = nsnull; + for (timeout = mTimeouts; timeout != &dummy_timeout && !IsFrozen(); timeout = nextTimeout) { + nextTimeout = timeout->mNext; if (timeout->mFiringDepth != firingDepth) { // We skip the timeout since it's on the list to run at another // depth. - prev = timeout; + prevTimeout = timeout; continue; } @@ -6691,12 +6691,12 @@ nsGlobalWindow::RunTimeout(nsTimeout *aT // Running a timeout can cause another timeout to be deleted, so // we need to reset the pointer to the following timeout. - next = timeout->mNext; + nextTimeout = timeout->mNext; - if (!prev) { - mTimeouts = next; + if (!prevTimeout) { + mTimeouts = nextTimeout; } else { - prev->mNext = next; + prevTimeout->mNext = nextTimeout; } // Release the timeout struct since it's out of the list @@ -6711,10 +6711,10 @@ nsGlobalWindow::RunTimeout(nsTimeout *aT } // Take the dummy timeout off the head of the list - if (!prev) { + if (!prevTimeout) { mTimeouts = dummy_timeout.mNext; } else { - prev->mNext = dummy_timeout.mNext; + prevTimeout->mNext = dummy_timeout.mNext; } mTimeoutInsertionPoint = last_insertion_point; @@ -6833,9 +6833,9 @@ nsGlobalWindow::ClearTimeoutOrInterval() void nsGlobalWindow::ClearAllTimeouts() { - nsTimeout *timeout, *next; + nsTimeout *timeout, *nextTimeout; - for (timeout = mTimeouts; timeout; timeout = next) { + for (timeout = mTimeouts; timeout; timeout = nextTimeout) { /* If RunTimeout() is higher up on the stack for this window, e.g. as a result of document.write from a timeout, then we need to reset the list insertion point for @@ -6844,7 +6844,7 @@ nsGlobalWindow::ClearAllTimeouts() if (mRunningTimeout == timeout) mTimeoutInsertionPoint = &mTimeouts; - next = timeout->mNext; + nextTimeout = timeout->mNext; if (timeout->mTimer) { timeout->mTimer->Cancel();