aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-10-04 00:54:05 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 21:35:49 +0200
commit19108aa3305df2172208c83500f5ac67d2dee104 (patch)
treed65138e8d1a8723cb30a56f8bd117f580f39438c /components/script/dom/document.rs
parent1fd470889dd9b4e6c3a871b6b40b50e30114443d (diff)
downloadservo-19108aa3305df2172208c83500f5ac67d2dee104.tar.gz
servo-19108aa3305df2172208c83500f5ac67d2dee104.zip
Pass a &GlobalScope to WebIDL static methods and constructors
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 0fbf4eb9c0c..bf2088bc15c 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -21,7 +21,6 @@ use dom::bindings::codegen::Bindings::TouchBinding::TouchMethods;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::codegen::UnionTypes::NodeOrString;
use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::global::GlobalRef;
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
use dom::bindings::js::{JS, LayoutJS, MutNullableHeap, Root};
use dom::bindings::js::RootedReference;
@@ -1819,8 +1818,8 @@ impl Document {
}
// https://dom.spec.whatwg.org/#dom-document
- pub fn Constructor(global: GlobalRef) -> Fallible<Root<Document>> {
- let win = global.as_global_scope().as_window();
+ pub fn Constructor(global: &GlobalScope) -> Fallible<Root<Document>> {
+ let win = global.as_window();
let doc = win.Document();
let doc = doc.r();
let docloader = DocumentLoader::new(&*doc.loader());