github web-platform-tests/wpt merge_pr_49387

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
9 months ago

Get stack traces for errors in most shadowrealm tests

This uses the non-standard stack property of Error, if it is present, to
provide stack trace information to the caller of shadowRealmEvalAsync().

The stack trace isn't available in shadowrealm-in-serviceworker and
shadowrealm-in-audioworklet contexts, because they implement a fake
dynamic import with ShadowRealm.prototype.evaluate(), which will wrap any
errors from the imported module in a TypeError and clobber any stack info.
We could do it by adding a try/catch around the module text, but that
would mess with line and column numbers; for now, we'll leave it.

Don't miss a new wpt release

NewReleases is sending notifications on new releases.