Commit graph

2 commits

Author SHA1 Message Date
Josh Matthews
0c3a130356 servo: Merge #2101 - Implement a safe, mostly-sound rooting rooting strategy (from jdm:newroot_rebase); r=Ms2ger
As described in #1764, this strategy uses the following properties:
* DOM members are `JS<T>` types. These cannot be used with being explicitly rooted, but they are required for compiler-derived trace hooks.
* Methods that take DOM type arguments receive `&[mut] JSRef<T>`. These are rooted value references that are cloneable but cannot escape.
* Methods that return DOM values use `Unrooted<T>`. These are values that may or may not be rooted elsewhere, but callers must root them in order to interact with them in any way. One unsoundness hole exists - `Unrooted` values must be rooted ASAP, or there exists the danger that JSAPI calls could be made that could cause the underlying JS value to be GCed.
* All methods are implemented on `JSRef<T>`, enforcing the requirement that all DOM values are rooted for the duration of a method call (with a few exceptions for layout-related code, which cannot root values and therefore interacts with `JS<T>` and `&T` values - this is safe under the assumption that layout code interacts with DOM nodes that are in the tree, therefore rooted, and does not run concurrently with content code)

Source-Repo: https://github.com/servo/servo
Source-Revision: 731e66ff132e41cdc49bc5324c0e15be19c46ec2
2014-05-03 14:25:22 -04:00
Manish Goregaokar
85f4f38077 servo: Merge #2292 - Webidl and basic implementation of XHR object (from Manishearth:xhr-webidl); r=Ms2ger
This just gets a working interface with dummy methods in place that can  be built on. I'll implement stuff as we go along.

Blocks #2282

Source-Repo: https://github.com/servo/servo
Source-Revision: 53777807f96e64c64f1ef995f54e630122856366
2014-05-03 04:37:11 -04:00