aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-09-27 13:16:41 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 20:59:09 +0200
commitfcb59d305742a18daa083352a9b6e9a45896c9f6 (patch)
treed1023c24bfb5827c49d4d4653a72541b66532b95 /components/script/dom/window.rs
parent093b189b4800909b17295b88aed762601f4b8482 (diff)
downloadservo-fcb59d305742a18daa083352a9b6e9a45896c9f6.tar.gz
servo-fcb59d305742a18daa083352a9b6e9a45896c9f6.zip
Make reflect_dom_object take a &GlobalScope
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 85c8f46fc63..0b764f6fa05 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -495,17 +495,17 @@ impl WindowMethods for Window {
// https://html.spec.whatwg.org/multipage/#dom-sessionstorage
fn SessionStorage(&self) -> Root<Storage> {
- self.session_storage.or_init(|| Storage::new(&GlobalRef::Window(self), StorageType::Session))
+ self.session_storage.or_init(|| Storage::new(self.upcast(), StorageType::Session))
}
// https://html.spec.whatwg.org/multipage/#dom-localstorage
fn LocalStorage(&self) -> Root<Storage> {
- self.local_storage.or_init(|| Storage::new(&GlobalRef::Window(self), StorageType::Local))
+ self.local_storage.or_init(|| Storage::new(self.upcast(), StorageType::Local))
}
// https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dfn-GlobalCrypto
fn Crypto(&self) -> Root<Crypto> {
- self.crypto.or_init(|| Crypto::new(GlobalRef::Window(self)))
+ self.crypto.or_init(|| Crypto::new(self.upcast()))
}
// https://html.spec.whatwg.org/multipage/#dom-frameelement
@@ -1708,7 +1708,7 @@ impl Window {
// Steps 3-12.
// FIXME(#13195): muted errors.
- let event = ErrorEvent::new(GlobalRef::Window(self),
+ let event = ErrorEvent::new(self.upcast(),
atom!("error"),
EventBubbles::DoesNotBubble,
EventCancelable::Cancelable,