diff options
author | Andreu Botella <andreu@andreubotella.com> | 2022-12-20 11:09:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 20:09:16 +0100 |
commit | fcca54d3ba2b5c1f9f45b70fde46ba07bde4d07b (patch) | |
tree | be02aefc24c8ce469058bc7a62cd32307434fac1 /ext/webidl/00_webidl.js | |
parent | 748ce0a435fee2b4f10fe027fa7e5e7224ac23c9 (diff) |
fix(core): Have custom errors be created in the right realm (#17050)
Although PR #16366 did not fully revert `deno_core`'s support for
realms, since `JsRealm` still existed after that, it did remove the
`ContextState` struct, originally introduced in #14734. This change made
`js_build_custom_error_cb`, among other properties, a per-runtime
callback, rather than per-realm, which cause a bug where errors thrown
from an op would always be constructed in the main realm, rather than in
the current one.
This change adds back `ContextState` to fix this bug, adds back the
`known_realms` field of `JsRuntimeState` (needed to be able to drop the
callback when snapshotting), and also relands #14750, which adds the
`js_realm_sync_ops` test for this bug that was removed in #16366.
Diffstat (limited to 'ext/webidl/00_webidl.js')
0 files changed, 0 insertions, 0 deletions