51c73837b0
Currently when we catch an exception thrown from JS we assume that it's an `Error`, with a `stack` property. This causes crashes when the exception value is not an `Error`, and the behavior is also inconsistent with dart2js, which returns an empty stack trace. This fixes the crash and makes the behavior consistent with dart2js. To make sure the behavior stays consistent, the relevant test is updated and moved from a dart2wasm-specific directory to a web directory. Change-Id: Ic6af7d919678ba585854c6531a103c0a5764e099 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478400 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Ömer Ağacan <omersa@google.com>
This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/tree/main/docs/Testing.md.