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

Address ILLink warning in InteropServices.JavaScript #45727

Merged
merged 3 commits into from
Dec 9, 2020

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Dec 8, 2020

In order to make the code trimming-compatible, a slight behavior change was made. The SetupJSContinuation method will only get the Result of Task<TResult> objects. If an object derives from the base Task class, and defines its own Result property, SetupJSContinuation will no longer respect that property.

This was done so the behavior remains consistent between trimmed and untrimmed applications.

Contributes to #45623

cc @vitek-karas @MichalStrehovsky

In order to make the code trimming-compatible, a slight behavior change was made. The SetupJSContinuation method will only get the Result of Task<TResult> objects. If an object derives from the base Task class, and defines its own Result property, SetupJSContinuation will no longer respect that property.

This was done so the behavior remains consistent between trimmed and untrimmed applications.

Contributes to dotnet#45623
Copy link
Contributor

@kg kg left a comment

Choose a reason for hiding this comment

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

Seems fine to me other than my comment

@eerhardt
Copy link
Member Author

eerhardt commented Dec 9, 2020

I've addressed the current feedback (thanks @MichalStrehovsky for the great suggestions!). Please take another look.

Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

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

thanks for digging into this, the changes look good

@lewing
Copy link
Member

lewing commented Dec 9, 2020

except for the IL2070 error

@eerhardt
Copy link
Member Author

eerhardt commented Dec 9, 2020

Failure is #44657.

@eerhardt eerhardt merged commit 361d830 into dotnet:master Dec 9, 2020
@eerhardt eerhardt deleted the FixJavaScriptWarnings branch December 9, 2020 21:39
@ghost ghost locked as resolved and limited conversation to collaborators Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants