mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Make get() and set() on MutNullableHeap use the correct types.
get() must always return a rooted value, because we have no way of ensuring the value won't be invalidated. set() takes an &T because it's convenient; there isn't any need to expose JS<T>.
This commit is contained in:
parent
7a08b29201
commit
57584e74c6
11 changed files with 68 additions and 67 deletions
|
@ -106,12 +106,12 @@ impl Event {
|
|||
|
||||
#[inline]
|
||||
pub fn set_current_target(&self, val: &EventTarget) {
|
||||
self.current_target.set(Some(JS::from_ref(val)));
|
||||
self.current_target.set(Some(val));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_target(&self, val: &EventTarget) {
|
||||
self.target.set(Some(JS::from_ref(val)));
|
||||
self.target.set(Some(val));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue