Skip to content

Commit

Permalink
[wasm][bench] Check for the muteErrors presence (#99536)
Browse files Browse the repository at this point in the history
to avoid rare exceptions we get during the measurements
`TypeError: this._frame.contentWindow.muteErrors is not a function`
  • Loading branch information
radekdoulik committed Mar 11, 2024
1 parent 9c828a1 commit efa2b78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mono/sample/wasm/browser-bench/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ class MainApp {
}

removeFrame() {
this._frame.contentWindow.muteErrors();
if (this._frame.contentWindow.muteErrors !== undefined)
this._frame.contentWindow.muteErrors();

document.body.removeChild(this._frame);
}
}
Expand Down

0 comments on commit efa2b78

Please sign in to comment.