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

[BUGFIX beta] Cleanup view teardown. #13775

Merged
merged 2 commits into from
Jul 1, 2016
Merged

Conversation

krisselden
Copy link
Contributor

@krisselden krisselden commented Jun 30, 2016

  • Add tests to ensure .parentView is available in all hooks.
  • Add tests to ensure .element is available in appropriate hooks.
  • add tests that assure counts of hooks in all dynamic scenarios
  • add regression tests

This should fix #12080 #12716 and #13028

@@ -192,7 +192,9 @@ class Renderer {
_renderResult.destroy();
}

view.destroy();
if (!view.isDestroying) {
Copy link
Member

Choose a reason for hiding this comment

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

should we guard against both isDestroying and isDestroyed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't unset isDestroying when we set isDestroyed but I can add that

Copy link
Member

Choose a reason for hiding this comment

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

ah, then its not needed. Seems good

@rwjblue
Copy link
Member

rwjblue commented Jul 1, 2016

OK, I added regression tests for the various scenarios that were tweaked here (including the specific issues linked in the description).

@krisselden
Copy link
Contributor Author

@rwjblue thank you so much for doing these tests.

krisselden and others added 2 commits July 1, 2016 15:12
* [Glimmer] Ensure `.parentView` is present at creation.
* Add tests for `.parentView` and `.element` in each lifecycle hook.
* Remove duplicated `parentView` manipulation (this is now done as part of `renderer.remove`).
* Add test ensuring `willDestroyElement` is called for inverse.
* Ensure element in DOM during willDestroyElement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parentView undefined during willDestroyElement
3 participants