mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Introduce mutable/immutable variants of reflector() with named lifetimes, and kill unsafe casts.
This commit is contained in:
parent
e6be738d97
commit
c4bbc4cd37
24 changed files with 158 additions and 87 deletions
|
@ -143,8 +143,12 @@ impl MouseEvent {
|
|||
}
|
||||
|
||||
impl Reflectable for MouseEvent {
|
||||
fn reflector(&mut self) -> &mut Reflector {
|
||||
return self.parent.reflector()
|
||||
fn reflector<'a>(&'a self) -> &'a Reflector {
|
||||
self.parent.reflector()
|
||||
}
|
||||
|
||||
fn mut_reflector<'a>(&'a mut self) -> &'a mut Reflector {
|
||||
self.parent.mut_reflector()
|
||||
}
|
||||
|
||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue