Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross realm signals #219

Open
mhofman opened this issue May 8, 2024 · 1 comment
Open

cross realm signals #219

mhofman opened this issue May 8, 2024 · 1 comment

Comments

@mhofman
Copy link
Member

mhofman commented May 8, 2024

What is the expected interactions of signals across realms, whether the callable boundary of ShadowRealms is involved or not.

In particular:

  • Would a watcher from one realm attempting to read during its notify callback a signal from another realm throw an error like it would for a signal from the same realm? Aka is it a cross realm brand check on signals?
  • What would subtle.currentComputed() return while executing a function in a realm different from where the "current computed" originated.
    • In particular, if the function is from a ShadowRealm, the callable boundary precludes observing the identity of objects from other realms. Similarly if the current computed is from a ShadowRealm, the callable boundary precludes observing its identity from another other realms, regardless whether that other realm is a ShadowRealm or "legacy" realm.
  • It's technically possibly to construct dependency graphs where a computed signal from one realm depends on a signal from another realm, even if one of the realm is a ShadowRealm (you pass through the callable boundary a get function "bound" to its signal). How would these dependencies be exposed without violating the callable boundary invariants.
@littledan
Copy link
Member

My first thought is, to stay conservative, we should make tracked reads throw when the current computed is from a different Realm. This will ensure that Realms do not have entangled dependency graphs (which, in the case of ShadowRealms, would give us something a bit unworkable when it comes to introspection).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants