Created attachment 543760 [details] testcase (requires popups to be enabled) The testcase triggers this assertion, usually within a few seconds: ###!!! ASSERTION: How did that happen?: '!IsTimeout(nextTimeout) || timeout->mWhen < nextTimeout->mWhen', file dom/base/nsGlobalWindow.cpp, line 9469 The function containing this assertion was added in bug 647001.
Taking. What's happening here is that the code in ResetTimersForNonBackgroundWindow assumes timers are stored in mWhen order, which is true _except_ in the middle of a timer firing. In that case, timers that come after it can have an earlier mWhen than the timer, apparently. That's the case we're hitting here, as far as I can tell: the b2 timer is firing, calls window.close(), that causes a switch back to the original window and an unclamping of some timer, etc. I'll dig into this a bit more to figure out exactly what's happening and how to fix it.
Created attachment 544645 [details] [diff] [review] Don't try to unclamp the dummy timeout.
Comment on attachment 544645 [details] [diff] [review] Don't try to unclamp the dummy timeout. Requesting aurora approval for this. This should be a safe fix; all we're doing is not unclamping timers that we're about to fire anyway, so that the invariants we assume about the sorting of the timer list continue to hold.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0a2) Gecko/20110821 Firefox/8.0a2 I runned the testcase and the results are that when allowing popups, the tab switches to the popup tab,over and over again(i don't know for how long, i only runned it for a few minutes). Is that the intended behaviour? Thanks.
Yes, that's the intended behavior given the code in the testcase.
Thanks for the clarification. Setting resolution to Verified Fixed.