mirror of
https://github.com/servo/servo.git
synced 2025-10-09 04:59:23 +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
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::EventTargetBinding;
|
||||
use dom::bindings::utils::{Reflectable, WrapperCache, BindingObject, DerivedWrapper};
|
||||
use dom::bindings::utils::{Reflectable, Reflector, BindingObject, DerivedWrapper};
|
||||
use script_task::page_from_context;
|
||||
|
||||
use js::glue::RUST_OBJECT_TO_JSVAL;
|
||||
|
@ -12,13 +12,13 @@ use js::jsapi::{JSObject, JSContext, JSVal};
|
|||
use std::cast;
|
||||
|
||||
pub struct EventTarget {
|
||||
wrapper: WrapperCache
|
||||
wrapper: Reflector
|
||||
}
|
||||
|
||||
impl EventTarget {
|
||||
pub fn new() -> ~EventTarget {
|
||||
~EventTarget {
|
||||
wrapper: WrapperCache::new()
|
||||
wrapper: Reflector::new()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
impl Reflectable for EventTarget {
|
||||
fn get_wrappercache(&mut self) -> &mut WrapperCache {
|
||||
fn get_wrappercache(&mut self) -> &mut Reflector {
|
||||
unsafe { cast::transmute(&self.wrapper) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue