mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make UntrustedNodeAddress a newtype.
This will allow us to make it Send after the Rust upgrade.
This commit is contained in:
parent
1b496d80de
commit
d2f0aac5ce
5 changed files with 7 additions and 5 deletions
|
@ -886,7 +886,7 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
|||
pub fn from_untrusted_node_address(runtime: *mut JSRuntime, candidate: UntrustedNodeAddress)
|
||||
-> Temporary<Node> {
|
||||
unsafe {
|
||||
let candidate: uintptr_t = mem::transmute(candidate);
|
||||
let candidate: uintptr_t = mem::transmute(candidate.0);
|
||||
let object: *mut JSObject = jsfriendapi::bindgen::JS_GetAddressableObject(runtime,
|
||||
candidate);
|
||||
if object.is_null() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue