diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-07-15 13:30:19 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-07-15 15:33:57 +0200 |
commit | 829259fb794831167c9992bd6b1c71bf81bd8023 (patch) | |
tree | 4426dba3705cf976e4ead2310e8b34ebac162947 /src/components/script/dom/testbinding.rs | |
parent | a14bb68c3f53ef5fbf562e145b60da46ece9fedc (diff) | |
download | servo-829259fb794831167c9992bd6b1c71bf81bd8023.tar.gz servo-829259fb794831167c9992bd6b1c71bf81bd8023.zip |
Introduce abstractions for global scopes.
Part of #2811.
Diffstat (limited to 'src/components/script/dom/testbinding.rs')
-rw-r--r-- | src/components/script/dom/testbinding.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/script/dom/testbinding.rs b/src/components/script/dom/testbinding.rs index e0da2b0734a..bf3e5f2d232 100644 --- a/src/components/script/dom/testbinding.rs +++ b/src/components/script/dom/testbinding.rs @@ -7,11 +7,11 @@ use dom::bindings::codegen::Bindings::TestBindingBinding::TestEnumValues::_empty use dom::bindings::codegen::UnionTypes::BlobOrString::BlobOrString; use dom::bindings::codegen::UnionTypes::EventOrString::{EventOrString, eString}; use dom::bindings::codegen::UnionTypes::HTMLElementOrLong::{HTMLElementOrLong, eLong}; -use dom::bindings::js::{JS, JSRef, Temporary}; +use dom::bindings::global::GlobalField; +use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::str::ByteString; use dom::bindings::utils::{Reflector, Reflectable}; use dom::blob::Blob; -use dom::window::Window; use servo_util::str::DOMString; use js::jsapi::JSContext; @@ -20,7 +20,7 @@ use js::jsval::{JSVal, NullValue}; #[deriving(Encodable)] pub struct TestBinding { reflector: Reflector, - global: JS<Window>, + global: GlobalField, } pub trait TestBindingMethods { @@ -278,19 +278,19 @@ pub trait TestBindingMethods { impl<'a> TestBindingMethods for JSRef<'a, TestBinding> { fn InterfaceAttribute(&self) -> Temporary<Blob> { let global = self.global.root(); - Blob::new(&*global) + Blob::new(&global.root_ref()) } fn GetInterfaceAttributeNullable(&self) -> Option<Temporary<Blob>> { let global = self.global.root(); - Some(Blob::new(&*global)) + Some(Blob::new(&global.root_ref())) } fn ReceiveInterface(&self) -> Temporary<Blob> { let global = self.global.root(); - Blob::new(&*global) + Blob::new(&global.root_ref()) } fn ReceiveNullableInterface(&self) -> Option<Temporary<Blob>> { let global = self.global.root(); - Some(Blob::new(&*global)) + Some(Blob::new(&global.root_ref())) } } |