mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Remove all traces of Box representation from bindings. Work around file read runtime problem.
This commit is contained in:
parent
bbac8aa5c3
commit
f279abbf9f
8 changed files with 31 additions and 45 deletions
|
@ -9,7 +9,6 @@ use layout_interface::TrustedNodeAddress;
|
|||
|
||||
use std::cast;
|
||||
use std::cell::RefCell;
|
||||
use std::raw::Box;
|
||||
|
||||
pub struct JS<T> {
|
||||
priv ptr: RefCell<*mut T>
|
||||
|
@ -50,13 +49,6 @@ impl<T: Reflectable> JS<T> {
|
|||
}
|
||||
|
||||
|
||||
pub unsafe fn from_box(box_: *mut Box<T>) -> JS<T> {
|
||||
let raw: *mut T = &mut (*box_).data;
|
||||
JS {
|
||||
ptr: RefCell::new(raw)
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn from_trusted_node_address(inner: TrustedNodeAddress) -> JS<T> {
|
||||
JS {
|
||||
ptr: RefCell::new(inner as *mut T)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue