mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Introduce trait WeakReferenceable
This allows to take weak references of JS-managed DOM objects.
This commit is contained in:
parent
12f6ba29a7
commit
72c67efe96
10 changed files with 268 additions and 5 deletions
|
@ -729,7 +729,8 @@ pub unsafe fn private_from_proto_check<F>(mut obj: *mut JSObject, proto_check: F
|
|||
}
|
||||
}
|
||||
|
||||
fn native_from_object<T>(obj: *mut JSObject) -> Result<*const T, ()>
|
||||
/// Get a `*const T` for a DOM object accessible from a `JSObject`.
|
||||
pub fn native_from_object<T>(obj: *mut JSObject) -> Result<*const T, ()>
|
||||
where T: Reflectable + IDLInterface
|
||||
{
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue