Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource scans happen in test iframes after they are removed #3709

Closed
cramforce opened this issue Jun 22, 2016 · 3 comments · Fixed by #3904
Closed

Resource scans happen in test iframes after they are removed #3709

cramforce opened this issue Jun 22, 2016 · 3 comments · Fixed by #3904

Comments

@cramforce
Copy link
Member

Because they get timed on the parent window.

They might just need to check whether the respective document still has a defaultView.

CC @muxin

cramforce added a commit to cramforce/amphtml that referenced this issue Jun 22, 2016
@ericlindley-g ericlindley-g modified the milestones: Next, Fixit - Date TBD Jun 29, 2016
@ericlindley-g
Copy link
Contributor

@cramforce — slotting this in the Fixit milestone, but please correct/update as needed

@mkhatib
Copy link
Contributor

mkhatib commented Jul 2, 2016

What is the resource scan? Is that the discoverWork_ loop?

@cramforce
Copy link
Member Author

Yeah, here is what happens:

  • Resource manager is per window.
  • but we have a single timer that we use across all windows.
  • that timer in tests belongs to main iframe
  • when test iframe gets removed, timers belonging to parent iframe still fire (because that wasn't removed)

Fixing might be as simple as giving resource manager its own timer. Likely the timer should just be a real per-window service.

CC @dvoytenko

cramforce added a commit to cramforce/amphtml that referenced this issue Jul 6, 2016
This could happen in tests if multiple windows had different lifetime. Also turns timer into a service but does not yet fix all callsites.

Fixes ampproject#3709 but all the other timer usages could lead to similar issues.
cramforce added a commit that referenced this issue Jul 6, 2016
This could happen in tests if multiple windows had different lifetime. Also turns timer into a service but does not yet fix all callsites.

Fixes #3709 but all the other timer usages could lead to similar issues.
ariangibson pushed a commit to Mixpo/amphtml that referenced this issue Sep 7, 2016
…3904)

This could happen in tests if multiple windows had different lifetime. Also turns timer into a service but does not yet fix all callsites.

Fixes ampproject#3709 but all the other timer usages could lead to similar issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants