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

Implement cross-origin wrappers #2382

Open
Ms2ger opened this issue May 9, 2014 · 10 comments
Open

Implement cross-origin wrappers #2382

Ms2ger opened this issue May 9, 2014 · 10 comments

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented May 9, 2014

We'll need to port XOWs from XPConnect.

@bholley suggested waiting until https://bugzilla.mozilla.org/show_bug.cgi?id=965898 lands.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Feb 12, 2016

The bugfix has landed on bugzilla.

@bholley
Copy link
Contributor

@bholley bholley commented Feb 12, 2016

FWIW, the spec for this is still being finalized (and is actually moving, after stalling for several years). So I might still wait a bit longer, or at least coordinate with @annevk.

@annevk
Copy link

@annevk annevk commented Feb 12, 2016

See whatwg/html#638 for progress on that. I guess there should also go some thought into whether Servo wants the Gecko or the Chromium setup. While the latter is not safe in the face of document.domain, it's vastly simpler.

@bholley
Copy link
Contributor

@bholley bholley commented Feb 12, 2016

Given that Servo is using SpiderMonkey, I would recommend the Gecko setup for access checks. The Chromium setup relies on a bunch of pretty-fragile invariants to make its simplifications. The SpiderMonkey people are unlikely to be paying as close attention to those details, because the wrapper/membrane setup makes Gecko safe by default.

Then there's the question of how to obtain the "clean view per-origin". Chromium uses Separate Worlds, which get tricky if you cache the reflector on the DOM object the way Gecko and Servo do (not sure what Chromium does there, exactly). Servo doesn't need the fully-general Xray setup that Gecko has, but may need some sort wrapper that gives the same behavior as CrossOriginXrayWrapper.

@jdm
Copy link
Member

@jdm jdm commented May 12, 2016

Relevant work:

@Ms2ger
Copy link
Contributor Author

@Ms2ger Ms2ger commented May 13, 2016

We should now be able to implement this from the spec: https://html.spec.whatwg.org/multipage/#cross-origin-objects.

@avadacatavra avadacatavra self-assigned this Aug 1, 2016
@avadacatavra
Copy link
Contributor

@avadacatavra avadacatavra commented Aug 1, 2016

I chatted with @bholley and @jdm--if it's ok, I'll start working on this.

Other relevant work:

@avadacatavra
Copy link
Contributor

@avadacatavra avadacatavra commented Sep 28, 2016

Pretty sure this is blocked on the various promises PRs

@jdm
Copy link
Member

@jdm jdm commented Sep 28, 2016

Promises are working; anything that is not should be filed with a testcase.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Oct 4, 2016

Some IRC chat: http://logs.glob.uno/?c=mozilla%23servo&s=4+Oct+2016&e=4+Oct+2016#c534539

TL;DR: we may have issues with XOWs in the case that the window is off in another process; this will probably require implementing a WindowProxy in Servo that tracks a pipeline id, so can implement Parent, Top, etc. but for most methods checks to see if the pipeline id is local, and throws a SecuityError if not.

@Ms2ger pointed me to the docs for SM WindowProxy: http://searchfox.org/mozilla-central/source/js/src/jsfriendapi.h#2845

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.