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

Revoke the items source view changed event if there is one irrespective of the oldValue #7277

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

ranjeshj
Copy link
Contributor

We sometimes seem to end up with handler that is not revoked because setting a new value for m_itemsSourceView before revoking causes the referenced value (pointed to by oldValue) becoming null. If the handler is not revoked, then we can end up in a crash if the events are being fired on a collection that is not the ItemsSource of repeater anymore. To avoid this completely, we can revoke the handler if there is one irrespective of the oldValue and also do it before saving the newValue.

…ve of the oldValue

We sometimes seem to end up with handler that is not revoked because setting a new value for m_itemsSourceView before revoking causes the referenced value (pointed to by oldValue) becoming null. If the handler is not revoked, then we can end up in a crash if the events are being fired on a collection that is not the ItemsSource of repeater anymore. To avoid this completely, we can revoke the handler if there is one irrespective of the oldValue and also do it before saving the newValue.
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jun 25, 2022
@ranjeshj
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj ranjeshj added this to the WinUI 2.8 milestone Jun 29, 2022
@ranjeshj ranjeshj merged commit 2102156 into main Jul 5, 2022
@ranjeshj ranjeshj deleted the ranjeshj-patch-1 branch July 5, 2022 18:11
@krschau krschau removed the needs-triage Issue needs to be triaged by the area owners label Jul 7, 2022
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.

4 participants