mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #8147 - nox:weakref, r=Ms2ger
Implement weak-referenceable JS-managed objects <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8147) <!-- Reviewable:end -->
This commit is contained in:
commit
e63b1e83d4
10 changed files with 268 additions and 5 deletions
|
@ -322,7 +322,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