Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement cross-origin wrappers #2382
Comments
|
The bugfix has landed on bugzilla. |
|
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. |
|
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. |
|
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. |
|
Relevant work:
|
|
We should now be able to implement this from the spec: https://html.spec.whatwg.org/multipage/#cross-origin-objects. |
|
I chatted with @bholley and @jdm--if it's ok, I'll start working on this. Other relevant work:
|
|
Pretty sure this is blocked on the various promises PRs |
|
Promises are working; anything that is not should be filed with a testcase. |
|
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 |
We'll need to port XOWs from XPConnect.
@bholley suggested waiting until https://bugzilla.mozilla.org/show_bug.cgi?id=965898 lands.