aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/node.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-07-15 13:30:19 +0200
committerMs2ger <ms2ger@gmail.com>2014-07-15 15:33:57 +0200
commit829259fb794831167c9992bd6b1c71bf81bd8023 (patch)
tree4426dba3705cf976e4ead2310e8b34ebac162947 /src/components/script/dom/node.rs
parenta14bb68c3f53ef5fbf562e145b60da46ece9fedc (diff)
downloadservo-829259fb794831167c9992bd6b1c71bf81bd8023.tar.gz
servo-829259fb794831167c9992bd6b1c71bf81bd8023.zip
Introduce abstractions for global scopes.
Part of #2811.
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r--src/components/script/dom/node.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index aacaa9bbedb..52b23c3b3e2 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -12,6 +12,7 @@ use dom::bindings::codegen::InheritTypes::{CharacterDataCast, NodeBase, NodeDeri
use dom::bindings::codegen::InheritTypes::{ProcessingInstructionCast, EventTargetCast};
use dom::bindings::codegen::Bindings::NodeBinding::NodeConstants;
use dom::bindings::error::{ErrorResult, Fallible, NotFound, HierarchyRequest, Syntax};
+use dom::bindings::global::{GlobalRef, Window};
use dom::bindings::js::{JS, JSRef, RootedReference, Temporary, Root, OptionalUnrootable};
use dom::bindings::js::{OptionalSettable, TemporaryPushable, OptionalRootedRootable};
use dom::bindings::js::{ResultRootable, OptionalRootable};
@@ -907,10 +908,10 @@ impl Node {
pub fn reflect_node<N: Reflectable+NodeBase>
(node: Box<N>,
document: &JSRef<Document>,
- wrap_fn: extern "Rust" fn(*mut JSContext, &JSRef<Window>, Box<N>) -> Temporary<N>)
+ wrap_fn: extern "Rust" fn(*mut JSContext, &GlobalRef, Box<N>) -> Temporary<N>)
-> Temporary<N> {
let window = document.window.root();
- reflect_dom_object(node, &*window, wrap_fn)
+ reflect_dom_object(node, &Window(*window), wrap_fn)
}
pub fn new_inherited(type_id: NodeTypeId, doc: &JSRef<Document>) -> Node {