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

Migrate to using @ember/destroyable for teardown. #914

Merged
merged 1 commit into from
Aug 26, 2020
Merged

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Aug 25, 2020

Moves actual logic from teardownContext into setupContext by using registerDestructor and associateDestroyableChild.

}

return nextTickPromise();
destroy(context);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were we only waiting for settled before because we were using runloop APIs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look just below, we are still return await settled() in the finally. I honestly do not know why we were doing it twice.

@scalvert
Copy link
Contributor

You have a linting failure with an unused import.

@rwjblue
Copy link
Member Author

rwjblue commented Aug 25, 2020

Currently blocked by #915

@rwjblue rwjblue marked this pull request as ready for review August 26, 2020 15:29
Moves actual logic from `teardownContext` into `setupContext` by using
`registerDestructor` and `associateDestroyableChild`.
@rwjblue rwjblue merged commit c7fbe04 into master Aug 26, 2020
@rwjblue rwjblue deleted the use-destroyables branch August 26, 2020 18:01
@rwjblue rwjblue changed the title Migrate to using @ember/destroyable for teardown. Migrate to using @ember/destroyable for teardown. Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants