-
Notifications
You must be signed in to change notification settings - Fork 698
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
Fix NavigationViewCrash with the attached revokers object pattern during cleanup. #6240
Conversation
…ched to them and to revoke those during deconstructing. Additionally ensure that the NavigationViewItemRevokers dependency property is only initialized once.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with suggestions.
nullptr /* defaultValue */); | ||
if (!s_NavigationViewItemRevokersProperty) | ||
{ | ||
s_NavigationViewItemRevokersProperty = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-existing issue: this is a multi-threaded race condition. Obviously it's pretty narrow now because you have to have two threads both trying to create a NavView at exactly the same time ... but maybe use std::call_once to synchronize the initialization?
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…ing cleanup. (#6240) * Update NavigationView to track which items get a revokers object attached to them and to revoke those during deconstructing. Additionally ensure that the NavigationViewItemRevokers dependency property is only initialized once. * Add an std::call_once block to the DP registration.
Update NavigationView to track which items get a revokers object attached to them and to revoke those during deconstructing. Additionally ensure that the NavigationViewItemRevokers dependency property is only initialized once.