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

Ensure that aborting layout via unload cancels the layout promise #32099

Merged
merged 4 commits into from
Jan 21, 2021

Conversation

dvoytenko
Copy link
Contributor

Partial for #31915.

src/service/resource.js Show resolved Hide resolved
test/unit/polyfills/test-abort-controller.js Outdated Show resolved Hide resolved
@samouri
Copy link
Member

samouri commented Jan 21, 2021

@dvoytenko: how did you discover this bug?

@dvoytenko
Copy link
Contributor Author

I was testing very quickly switching from slide to slide in carousel with an iframe. It'd call sometimes unload before layout is complete. See test-resource.js for exactly where it failed.

@dvoytenko dvoytenko merged commit 253090f into ampproject:master Jan 21, 2021
@dvoytenko dvoytenko deleted the run3/abort-signal-event branch January 21, 2021 20:11
PetrBlaha pushed a commit to PetrBlaha/amphtml that referenced this pull request Jan 28, 2021
…pproject#32099)

* Ensure that aborting layout via unload cancels the layout promise

* synthetic Event

* cleanup

* prevent double firing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants