Update JSCallResultTypeHelper.cs - #25628
Conversation
dougbu
left a comment
There was a problem hiding this comment.
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.
|
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>()comparingTResultwith up to threeIJSObjectReferencetypes. We can optimize this slightly for the general case by first checking iftypeof(TResult).Assemblymatches the assembly containingJSCallResultTypebefore 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