-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Update JSCallResultTypeHelper.cs #25628
Update JSCallResultTypeHelper.cs #25628
Conversation
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.
This PR fixes a build break. We need it in ASAP
@Pilchie should I proactively merge this to unbreak the build, letting @SteveSandersonMS and @MackinnonBuck follow up on the C# change if there's something wrong there❔ |
Never mind this PR @Pilchie except for its ask mode aspect. I merged #25629 because that "just" unbreaks the build. Many thanks @MackinnonBuck❕ |
Can this be tested? |
@MackinnonBuck please ping when CI is green and this is signed off. Dismissing @dougbu's signoff since I presume it was based on just the build fix. |
The initial review was to pull in the build fix (which has been resolved), not the C# change.
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.
Great!
Hello human! Please make sure you've included the Shiproom Template in a comment or (preferably) the PR description. Also, make sure this PR is not marked as a draft and is ready-to-merge. |
Approved for .NET 5.0 RC2. |
Description
Currently, each .NET->JavaScript interop call results in
JSCallResultTypeHelper.FromGeneric<TResult>()
comparingTResult
with up to threeIJSObjectReference
types. We can optimize this slightly for the general case by first checking iftypeof(TResult).Assembly
matches the assembly containingJSCallResultType
before performing the other checks.Customer Impact
Customers may see a slight performance improvement for JS interop calls.
Regression?
No.
Risk
Very small risk. This is a small change and existing tests cover this area.
Addresses #25624