[browser][MT] .NET 9 regression of sync interop #111098
Labels
arch-wasm
WebAssembly architecture
area-System.Runtime.InteropServices.JavaScript
untriaged
New issue has not been triaged by the area owner
Description
In .NET 8 it was possible to use sync/blocking interop in MT mode without any restrictions. For example, here is a sample which uses threading and nested sync interop for both JSImport and JSExport and works fine in .NET 8: https://github.com/elringus/bootsharp/tree/v0.3.3/samples/react
This same use case is no longer possible in .NET 9 (https://github.com/elringus/bootsharp/tree/main/samples/react)
Even with:
— it still throws when attempting to invoke sync JS function from within a sync JSExport.
Given this worked fine in .NET 8, it appears to be a regression. I'm fine with any kind of opt-in "dangerous" switches and "use at your own risk" contexts, but please restore the functionality .NET 8 had.
Reproduction Steps
Expected behavior
The sample should work on both .NET 8 and .NET 9
Actual behavior
The sample throw errors on .NET 9
Regression?
This is a regression in .NET 9
Known Workarounds
None.
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: