Skip to content


Browse files Browse the repository at this point in the history
[wasm] Fix condition to use latest chrome for testing (#89890)
* [wasm] Fix condition to use latest chrome for testing
* [wasm] CI: Trigger WBT on changes in ProvisioningVersions.props

* [wasm] runtime: Fix creating the stack trace for a ManagedError

With the latest chrome (`115.*`) the following code in
`runtime/marshal.ts` fails because `this.superStack.value` is no longer

    getSuperStack() {
        if (this.superStack) {
            return this.superStack.value;
        return super.stack; // this works on FF

This causes the final error to not have the original managed error
message, and also have a `"undefined"` at the end of the string.

Truncated error missing the native part of the stack, and the message:
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.ThrowFromJSExport(String message)
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.__Wrapper_ThrowFromJSExport_271731536(JSMarshalerArgument* __arguments_buffer)

With the fix:
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.ThrowFromJSExport(String message)
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.__Wrapper_ThrowFromJSExport_817705034(JSMarshalerArgument* __arguments_buffer)
Error: -t-e-s-t-
    at sr (
    at Br (
    at Module.catch1stack (
    at mr (
    at do_icall ([221]:0x19711)
    at do_icall_wrapper ([108]:0x157bc)
    at mono_interp_exec_method ([101]:0x9c92)
    at interp_runtime_invoke ([141]:0x16cd7)

Thanks to @kg for the fix.
  • Loading branch information
radical committed Aug 3, 2023
1 parent a3816fe commit 00afdc0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions eng/pipelines/common/evaluate-default-paths.yml
Expand Up @@ -178,6 +178,7 @@ jobs:
- eng/Version.Details.xml
- eng/Versions.props
- eng/testing/scenarios/BuildWasmAppsJobsList.txt
- eng/testing/workloads-testing.targets
- src/installer/pkg/sfx/Microsoft.NETCore.App/*
Expand Down
2 changes: 2 additions & 0 deletions eng/testing/ProvisioningVersions.props
Expand Up @@ -45,6 +45,8 @@
<!-- To use a specific version, set ChromeFindLatestAvailableVersion=false,
and set the version, and revisions in the propertygroup below -->

<ChromeFindLatestAvailableVersion Condition="'$(ChromeFindLatestAvailableVersion)' == ''">true</ChromeFindLatestAvailableVersion>

<PropertyGroup Label="Use specific version of chrome" Condition="'$(ChromeFindLatestAvailableVersion)' != 'true' and $([MSBuild]::IsOSPlatform('linux'))">
Expand Down
5 changes: 4 additions & 1 deletion src/mono/wasm/runtime/marshal.ts
Expand Up @@ -331,7 +331,10 @@ export class ManagedError extends Error implements IDisposable {

getSuperStack() {
if (this.superStack) {
return this.superStack.value;
if (this.superStack.value !== undefined)
return this.superStack.value;
if (this.superStack.get !== undefined)
return super.stack; // this works on FF
Expand Down

0 comments on commit 00afdc0

Please sign in to comment.