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

Fix TintLuminosityOpacity crash by removing const_cast and passing by non-const #1059

Merged
merged 2 commits into from
Jul 17, 2019

Conversation

jevansaks
Copy link
Member

The DependencyProperty codegen for coercion callback was passing the const param through and forcing the callee to receive the parameter by const&, which led to someone using const_cast to try to modify the passed in value. This appeared to work but was over-releasing the incoming object and leaking the new object it had created.

The simplest solution is to make a temporary local to pass in to the coercion callback to remove the need for a const_cast.

I've changed the codegen and updated the build tasks nupkg.

Fixes #1022

@jevansaks jevansaks added the release note PR that we want to call out in the next release summary label Jul 16, 2019
@jevansaks jevansaks requested review from DmitriyKomin, codendone and a team July 16, 2019 16:57
@jevansaks jevansaks merged commit 6397319 into master Jul 17, 2019
@jevansaks jevansaks deleted the user/jevansaks/coercionfixes branch July 17, 2019 04:41
@msft-github-bot
Copy link
Collaborator

🎉Microsoft.UI.Xaml v2.2.190731001-prerelease has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release note PR that we want to call out in the next release summary
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AcrylicBrush.TintLuminosityOpacity can't be changed in release
3 participants