mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Move unwrap_jsmanaged and related machinery to conversions.rs.
This commit is contained in:
parent
73c236ce3b
commit
96180ec3ad
5 changed files with 124 additions and 113 deletions
|
@ -19,6 +19,7 @@ use dom::bindings::codegen::InheritTypes::{CharacterDataCast, NodeBase, NodeDeri
|
|||
use dom::bindings::codegen::InheritTypes::{ProcessingInstructionCast, EventTargetCast};
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLLegendElementDerived, HTMLFieldSetElementDerived};
|
||||
use dom::bindings::codegen::InheritTypes::HTMLOptGroupElementDerived;
|
||||
use dom::bindings::conversions;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::error::Error::{NotFound, HierarchyRequest, Syntax};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
|
@ -26,7 +27,6 @@ use dom::bindings::js::{JS, JSRef, RootedReference, Temporary, Root};
|
|||
use dom::bindings::js::{OptionalSettable, TemporaryPushable, OptionalRootedRootable};
|
||||
use dom::bindings::js::{ResultRootable, OptionalRootable, MutNullableJS};
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use dom::bindings::utils;
|
||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::comment::Comment;
|
||||
|
@ -884,7 +884,7 @@ pub fn from_untrusted_node_address(runtime: *mut JSRuntime, candidate: Untrusted
|
|||
if object.is_null() {
|
||||
panic!("Attempted to create a `JS<Node>` from an invalid pointer!")
|
||||
}
|
||||
let boxed_node: *const Node = utils::unwrap(object);
|
||||
let boxed_node: *const Node = conversions::unwrap(object);
|
||||
Temporary::new(JS::from_raw(boxed_node))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue