-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Conversation
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
....Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Runtime.cs
Outdated
Show resolved
Hide resolved
....Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Runtime.cs
Outdated
Show resolved
Hide resolved
....Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Runtime.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
....Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Runtime.cs
Outdated
Show resolved
Hide resolved
I've addressed the current feedback (thanks @MichalStrehovsky for the great suggestions!). Please take another look. |
There was a problem hiding this 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
except for the IL2070 error |
....Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Runtime.cs
Outdated
Show resolved
Hide resolved
Failure is #44657. |
In order to make the code trimming-compatible, a slight behavior change was made. The
SetupJSContinuation
method will only get theResult
ofTask<TResult>
objects. If an object derives from the base Task class, and defines its ownResult
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