Bug 825949 followup: in nsGlobalWindow::SetTimeoutOrInterval, make |realInterval| unsigned, since it's known-nonnegative and is passed elsewhere as an unsigned integer. r=smaug

This commit is contained in:
Daniel Holbert 2013-01-03 13:48:52 -08:00
parent 644886209a
commit 30730cbf21

View File

@ -9571,11 +9571,11 @@ nsGlobalWindow::SetTimeoutOrInterval(nsIScriptTimeoutHandler *aHandler,
// Now clamp the actual interval we will use for the timer based on
uint32_t nestingLevel = sNestingLevel + 1;
int32_t realInterval = interval;
uint32_t realInterval = interval;
if (aIsInterval || nestingLevel >= DOM_CLAMP_TIMEOUT_NESTING_LEVEL) {
// Don't allow timeouts less than DOMMinTimeoutValue() from
// now...
realInterval = NS_MAX(realInterval, DOMMinTimeoutValue());
realInterval = NS_MAX(realInterval, uint32_t(DOMMinTimeoutValue()));
}
// Get principal of currently executing code, save for execution of timeout.