未验证 提交 cf2187b0 编写于 作者: P Pavel Savara 提交者: GitHub

[wasm] mark JSImportGenerator C# only #72007

- mark JSImportGenerator C# only
- Viktor's feedback
- put back lost method GetCSOwnedObjectJSHandleRef
上级 36208a52
......@@ -21,6 +21,7 @@
<PackageTags>JSImportGenerator, analyzers</PackageTags>
<IsNETCoreAppAnalyzer>true</IsNETCoreAppAnalyzer>
<DefineConstants>$(DefineConstants);JSIMPORTGENERATOR</DefineConstants>
<AnalyzerLanguage>cs</AnalyzerLanguage>
</PropertyGroup>
<ItemGroup>
......
......@@ -3,7 +3,6 @@
<TargetFrameworks>$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<RootNamespace></RootNamespace>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
......@@ -12,15 +11,6 @@
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'Browser'">SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Collections" />
<Reference Include="System.Memory" />
<Reference Include="System.Net.Primitives" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Threading" />
</ItemGroup>
<ItemGroup>
<Compile Include="System.Runtime.InteropServices.JavaScript.SupportedOSPlatform.cs" />
</ItemGroup>
......@@ -70,9 +60,16 @@
<Compile Include="System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.JSObject.cs" />
<Compile Include="System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.String.cs" />
<Compile Include="System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Exception.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Collections" />
<Reference Include="System.Memory" />
<Reference Include="System.Net.Primitives" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Threading" />
</ItemGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<AnalyzerReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj" Pack="true" ReferenceAnalyzer="true" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>
......@@ -31,6 +31,18 @@ public static void GetCSOwnedObjectByJSHandleRef(IntPtr jsHandle, int shouldAddI
result = null;
}
[MethodImplAttribute(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425
public static IntPtr GetCSOwnedObjectJSHandleRef(in JSObject jsObject, int shouldAddInflight)
{
jsObject.AssertNotDisposed();
if (shouldAddInflight != 0)
{
jsObject.AddInFlight();
}
return jsObject.JSHandle;
}
[MethodImplAttribute(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425
public static IntPtr TryGetCSOwnedObjectJSHandleRef(in object rawObj, int shouldAddInflight)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册