You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ensure repeating timers are cancelled when their document is discarded #14678
@jdm I'm thinking of both, I think. The spec around this stuff is somewhere between useless and vague, but in practice you want to prevent setTimeout/setInterval both when a document is navigated away from (becomes inactive) and when its browsing context is destroyed (per spec doesn't seem to become inactive).
Activity
bzbarsky commentedon Dec 22, 2016
And prevent new setTimeout/Interval calls from creating new timers?
jdm commentedon Dec 22, 2016
@bzbarsky Are you thinking of inactive documents rather than discarded ones?
asajeffrey commentedon Dec 22, 2016
@jdm: is the problem that some documents can be discarded without being frozen first?
jdm commentedon Dec 22, 2016
Oh, I think my fears may be unjustified - it looks like repetition is handled by the script thread, rather than the timer scheduling thread.
bzbarsky commentedon Dec 22, 2016
@jdm I'm thinking of both, I think. The spec around this stuff is somewhere between useless and vague, but in practice you want to prevent setTimeout/setInterval both when a document is navigated away from (becomes inactive) and when its browsing context is destroyed (per spec doesn't seem to become inactive).
asajeffrey commentedon Jan 12, 2017
@jdm: are your fears unjustified enough that we can close this issue?
jdm commentedon Jan 12, 2017
Yes.
asajeffrey commentedon Jan 12, 2017
@jdm: thanks!