mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Clean up the conversion routines
Functions returning `Root<T>` are prefixed by "root_" and the ones returning `*const T` by "native_". Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones taking `&T` by "_from_reflector".
This commit is contained in:
parent
aa105d89b4
commit
b290a3161d
10 changed files with 45 additions and 61 deletions
|
@ -933,7 +933,7 @@ pub fn from_untrusted_node_address(_runtime: *mut JSRuntime, candidate: Untruste
|
|||
if object.is_null() {
|
||||
panic!("Attempted to create a `JS<Node>` from an invalid pointer!")
|
||||
}
|
||||
let boxed_node: *const Node = conversions::native_from_reflector(object);
|
||||
let boxed_node = conversions::private_from_object(object) as *const Node;
|
||||
Root::from_ref(&*boxed_node)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue