mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
auto merge of #4818 : Ms2ger/servo/tna-parser, r=jdm
This commit is contained in:
commit
45ebcf1df7
3 changed files with 33 additions and 43 deletions
|
@ -187,17 +187,6 @@ impl <T> Clone for LayoutJS<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl JS<Node> {
|
||||
/// Create a new JS-owned value wrapped from an address known to be a `Node` pointer.
|
||||
pub unsafe fn from_trusted_node_address(inner: TrustedNodeAddress) -> JS<Node> {
|
||||
let TrustedNodeAddress(addr) = inner;
|
||||
assert!(!addr.is_null());
|
||||
JS {
|
||||
ptr: NonZero::new(addr as *const Node)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl LayoutJS<Node> {
|
||||
/// Create a new JS-owned value wrapped from an address known to be a `Node` pointer.
|
||||
pub unsafe fn from_trusted_node_address(inner: TrustedNodeAddress) -> LayoutJS<Node> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue