diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs index e2ee42ffec2f6..6bb74c0f42fe8 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs @@ -277,7 +277,7 @@ public static void InstallMainSynchronizationContext(JSMarshalerArgument* argume } catch (Exception ex) { - Environment.FailFast($"InstallMainSynchronizationContext: Unexpected failure (ManagedThreadId {Environment.CurrentManagedThreadId}): " + ex); + arg_exc.ToJS(ex); } } diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs index 2a2f134e9e9e0..e93b1774d6871 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs @@ -294,9 +294,9 @@ private void Pump() // otherwise, we could schedule another round AwaitNewData(); } - catch (Exception ex) + catch (Exception e) { - Environment.FailFast($"JSSynchronizationContext.Pump: Unexpected failure (ManagedThreadId {Environment.CurrentManagedThreadId}): " + ex); + Environment.FailFast($"JSSynchronizationContext.Pump failed, ManagedThreadId: {Environment.CurrentManagedThreadId}. {Environment.NewLine} {e.StackTrace}"); } } diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/WebWorkerTest.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/WebWorkerTest.cs index c247ef332921f..24ff04897c2a8 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/WebWorkerTest.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/WebWorkerTest.cs @@ -520,7 +520,6 @@ await executor.Execute(async () => } [Theory, MemberData(nameof(GetTargetThreadsAndBlockingCalls))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/99951")] public async Task WaitAssertsOnSyncCallback(Executor executor, NamedCall method) { using var cts = CreateTestCaseTimeoutSource(); @@ -556,7 +555,6 @@ await WebWorkerTestHelper.CallMeBackSync(() => } [Theory, MemberData(nameof(GetTargetThreadsAndBlockingCalls))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/99951")] public async Task WaitAssertsOnSyncJSExport(Executor executor, NamedCall method) { using var cts = CreateTestCaseTimeoutSource();