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

Don't unwrap wrapped DataObject inner data store #12800

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

JeremyKuhne
Copy link
Member

@JeremyKuhne JeremyKuhne commented Jan 16, 2025

When creating a DataObject from another DataObject we need to keep the original DataObject as the "inner" data so that virtuals get called as they historically have.

Also pass through to correct overload on TryGetDataCore.

Fixes #12789

(Note that #12789 is "fixed" by wrapping/unwrapping the original DataObject in #12738, but that doesn't fix the underlying problem.)

Microsoft Reviewers: Open in CodeFlow

When creating a DataObject from another DataObject we need to keep the original DataObject as the "inner" data so that virtuals get called as they historically have.

Also pass through to correct overload on TryGetDataCore.

Fixes dotnet#12789
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 97.26027% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.20451%. Comparing base (3b8e1a6) to head (f2d300d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12800         +/-   ##
===================================================
+ Coverage   76.18925%   76.20451%   +0.01525%     
===================================================
  Files           3195        3197          +2     
  Lines         640404      640529        +125     
  Branches       47239       47242          +3     
===================================================
+ Hits          487919      488112        +193     
+ Misses        148947      148892         -55     
+ Partials        3538        3525         -13     
Flag Coverage Δ
Debug 76.20451% <97.26027%> (+0.01525%) ⬆️
integration 18.16125% <50.00000%> (+0.00822%) ⬆️
production 50.14921% <100.00000%> (+0.02424%) ⬆️
test 97.02444% <97.10145%> (+0.00050%) ⬆️
unit 47.54635% <100.00000%> (-0.00706%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@lonitra lonitra left a comment

Choose a reason for hiding this comment

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

lgtm! 👍

@JeremyKuhne JeremyKuhne merged commit c00d772 into dotnet:main Jan 16, 2025
8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview1 milestone Jan 16, 2025
JeremyKuhne added a commit to JeremyKuhne/winforms that referenced this pull request Jan 18, 2025
When creating a DataObject from another DataObject we need to keep the original DataObject as the "inner" data so that virtuals get called as they historically have.

Also pass through to correct overload on TryGetDataCore.

Fixes dotnet#12789
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.

Clipboard.SetDataObject method regression in .NET 9.0.100-rc.2
2 participants