Remove the pointer to the Rust object in Root.

It is already stored inside the jsref field.
This commit is contained in:
Ms2ger 2014-06-28 17:09:33 +02:00
parent 362feaa4a9
commit 2b06bbdb2f

View file

@ -388,8 +388,6 @@ pub struct Root<'a, 'b, T> {
root_list: &'a RootCollection,
/// Reference to rooted value that must not outlive this container
jsref: JSRef<'b, T>,
/// Pointer to underlying Rust data
ptr: *T,
/// On-stack JS pointer to assuage conservative stack scanner
js_ptr: *mut JSObject,
}
@ -405,7 +403,6 @@ impl<'a, 'b, T: Reflectable> Root<'a, 'b, T> {
ptr: unrooted.ptr.clone(),
chain: ContravariantLifetime,
},
ptr: unrooted.ptr.clone(),
js_ptr: unrooted.reflector().get_jsobject(),
};
roots.root(&root);