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-compartment wrappers #9

Open
asajeffrey opened this issue Aug 31, 2017 · 1 comment
Open

Cross-compartment wrappers #9

asajeffrey opened this issue Aug 31, 2017 · 1 comment

Comments

@asajeffrey
Copy link
Owner

We need some way to allow JS-managed data in compartment C to point to data in compartment D, e.g. with a cross-compartment wrapper.

@asajeffrey
Copy link
Owner Author

Perhaps the way to do this is to provide a MaybeCCW<T> wrapper, which can be queried to either be a same-compartment T or a cross-compartment T::Transplanted where T: Transplantable<SOMEWHERE>. For example a MaybeCCW<Window<'a, C>> would either be a Window<'a, C> or a Window<'a, SOMEWHERE>.

If we only allow MaybeCCW<T> objects to be brain-transplanted, then their type isn't changed by transplanting.

Perhaps this should be MaybeXOW<T>, with three-options: a T, a cross-compartment same-origin T::Transplanted, or a cross-compartment cross-origin wrapper (in which case access to the T::Transplanted is unsafe???).

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

1 participant