Skip to content

Make lack of weak-ref support more debuggable in C++/WinRT#502

Merged
kennykerr merged 3 commits into
masterfrom
kennykerr-weak
Jul 9, 2019
Merged

Make lack of weak-ref support more debuggable in C++/WinRT#502
kennykerr merged 3 commits into
masterfrom
kennykerr-weak

Conversation

@kennykerr

Copy link
Copy Markdown
Contributor

A few OS APIs (mostly just Windows.UI.Composition) still don't support weak references and this causes a lot of pain for developers who don't realize why something so fundamental fails for a small subset of APIs. The problem is hard to diagnose for developers because it is reported as an E_NOINTERFACE exception that quickly propagates away from the source of the problem. It is a coding bug (and not a recoverable error) to use auto_revoke/weak_ref with an object that does not support weak references. This change makes such a failure far easier to debug by turning it into an immediate crash.

@kennykerr kennykerr changed the title Make lack or weak-ref support more debuggable in C++/WinRT Make lack of weak-ref support more debuggable in C++/WinRT Jul 8, 2019
@kennykerr kennykerr merged commit 54c1e29 into master Jul 9, 2019
@kennykerr kennykerr deleted the kennykerr-weak branch July 9, 2019 17:45
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.

3 participants