mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Rename WrapperCache to Reflector.
I think the abstraction from the raw JSObject is still probably worthwhile for now.
This commit is contained in:
parent
0a0599ad9b
commit
2cbe2d7ce9
24 changed files with 81 additions and 81 deletions
|
@ -528,15 +528,15 @@ pub fn initialize_global(global: *JSObject) {
|
|||
}
|
||||
|
||||
pub trait Reflectable {
|
||||
fn get_wrappercache(&mut self) -> &mut WrapperCache;
|
||||
fn get_wrappercache(&mut self) -> &mut Reflector;
|
||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject;
|
||||
}
|
||||
|
||||
pub struct WrapperCache {
|
||||
pub struct Reflector {
|
||||
wrapper: *JSObject
|
||||
}
|
||||
|
||||
impl WrapperCache {
|
||||
impl Reflector {
|
||||
pub fn get_wrapper(&self) -> *JSObject {
|
||||
unsafe { cast::transmute(self.wrapper) }
|
||||
}
|
||||
|
@ -549,8 +549,8 @@ impl WrapperCache {
|
|||
return to_unsafe_ptr(&self.wrapper);
|
||||
}
|
||||
|
||||
pub fn new() -> WrapperCache {
|
||||
WrapperCache {
|
||||
pub fn new() -> Reflector {
|
||||
Reflector {
|
||||
wrapper: ptr::null()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue