Skip to content

Ensure repeating timers are cancelled when their document is discarded #14678

Closed

Description

@jdm

Otherwise they'll repeat forever once we make #14677 not panic any more.

Activity

  1. added
    A-content/script
    I-perf-slow
    on Dec 22, 2016
  2. self-assigned this
    on Dec 22, 2016
  3. bzbarsky commented on Dec 22, 2016

    @bzbarsky
    Contributor

    And prevent new setTimeout/Interval calls from creating new timers?

  4. jdm commented on Dec 22, 2016

    @jdm
    MemberAuthor

    @bzbarsky Are you thinking of inactive documents rather than discarded ones?

  5. asajeffrey commented on Dec 22, 2016

    @asajeffrey
    Contributor

    @jdm: is the problem that some documents can be discarded without being frozen first?

  6. jdm commented on Dec 22, 2016

    @jdm
    MemberAuthor

    Oh, I think my fears may be unjustified - it looks like repetition is handled by the script thread, rather than the timer scheduling thread.

  7. bzbarsky commented on Dec 22, 2016

    @bzbarsky
    Contributor

    @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).

  8. asajeffrey commented on Jan 12, 2017

    @asajeffrey
    Contributor

    @jdm: are your fears unjustified enough that we can close this issue?

  9. jdm commented on Jan 12, 2017

    @jdm
    MemberAuthor

    Yes.

  10. asajeffrey commented on Jan 12, 2017

    @asajeffrey
    Contributor

    @jdm: thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-content/scriptI-perf-slow

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions