diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-07-15 12:09:21 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-07-15 15:33:56 +0200 |
commit | f963ed99ac6b31b15da8c58cf45f142f93d001f1 (patch) | |
tree | d42534c2af39f994a4f708cd9f72d18c5d51fb42 /src/components/script/dom/testbinding.rs | |
parent | ab1a188e953faa8e99d10984a64a5474eeb1ff56 (diff) | |
download | servo-f963ed99ac6b31b15da8c58cf45f142f93d001f1.tar.gz servo-f963ed99ac6b31b15da8c58cf45f142f93d001f1.zip |
Rename variables that refer to global objects.
This clarifies whether those variables will point to a Window object or an
arbitrary global object.
Note in particular that all IDL Constructors will accept an arbitrary global
object.
Diffstat (limited to 'src/components/script/dom/testbinding.rs')
-rw-r--r-- | src/components/script/dom/testbinding.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/components/script/dom/testbinding.rs b/src/components/script/dom/testbinding.rs index 72d2f68dd88..832cc97e1d7 100644 --- a/src/components/script/dom/testbinding.rs +++ b/src/components/script/dom/testbinding.rs @@ -22,7 +22,7 @@ use std::cell::Cell; #[deriving(Encodable)] pub struct TestBinding { pub reflector: Reflector, - pub window: Cell<JS<Window>>, + pub global: Cell<JS<Window>>, } pub trait TestBindingMethods { @@ -279,20 +279,20 @@ pub trait TestBindingMethods { impl<'a> TestBindingMethods for JSRef<'a, TestBinding> { fn InterfaceAttribute(&self) -> Temporary<Blob> { - let window = self.window.get().root(); - Blob::new(&*window) + let global = self.global.get().root(); + Blob::new(&*global) } fn GetInterfaceAttributeNullable(&self) -> Option<Temporary<Blob>> { - let window = self.window.get().root(); - Some(Blob::new(&*window)) + let global = self.global.get().root(); + Some(Blob::new(&*global)) } fn ReceiveInterface(&self) -> Temporary<Blob> { - let window = self.window.get().root(); - Blob::new(&*window) + let global = self.global.get().root(); + Blob::new(&*global) } fn ReceiveNullableInterface(&self) -> Option<Temporary<Blob>> { - let window = self.window.get().root(); - Some(Blob::new(&*window)) + let global = self.global.get().root(); + Some(Blob::new(&*global)) } } |