aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/navigator.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-10-01 18:15:15 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 21:35:38 +0200
commitae6af5172b5f09e9ba19d0beca026fd0ac39f8c8 (patch)
treed60b33499b7caf460b78d53131bb0f147b6e5be0 /components/script/dom/navigator.rs
parent27f100b1d47058b92d0e23d8c1b2e472fb0eafca (diff)
downloadservo-ae6af5172b5f09e9ba19d0beca026fd0ac39f8c8.tar.gz
servo-ae6af5172b5f09e9ba19d0beca026fd0ac39f8c8.zip
Introduce Reflectable::global_scope
Diffstat (limited to 'components/script/dom/navigator.rs')
-rw-r--r--components/script/dom/navigator.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs
index d4e4629e486..51dbf5bbfa7 100644
--- a/components/script/dom/navigator.rs
+++ b/components/script/dom/navigator.rs
@@ -79,7 +79,7 @@ impl NavigatorMethods for Navigator {
// https://webbluetoothcg.github.io/web-bluetooth/#dom-navigator-bluetooth
fn Bluetooth(&self) -> Root<Bluetooth> {
- self.bluetooth.or_init(|| Bluetooth::new(self.global().r().as_global_scope()))
+ self.bluetooth.or_init(|| Bluetooth::new(&self.global_scope()))
}
// https://html.spec.whatwg.org/multipage/#navigatorlanguage
@@ -89,12 +89,12 @@ impl NavigatorMethods for Navigator {
// https://html.spec.whatwg.org/multipage/#dom-navigator-plugins
fn Plugins(&self) -> Root<PluginArray> {
- self.plugins.or_init(|| PluginArray::new(self.global().r().as_global_scope()))
+ self.plugins.or_init(|| PluginArray::new(&self.global_scope()))
}
// https://html.spec.whatwg.org/multipage/#dom-navigator-mimetypes
fn MimeTypes(&self) -> Root<MimeTypeArray> {
- self.mime_types.or_init(|| MimeTypeArray::new(self.global().r().as_global_scope()))
+ self.mime_types.or_init(|| MimeTypeArray::new(&self.global_scope()))
}
// https://html.spec.whatwg.org/multipage/#dom-navigator-javaenabled
@@ -105,7 +105,7 @@ impl NavigatorMethods for Navigator {
// https://w3c.github.io/ServiceWorker/#navigator-service-worker-attribute
fn ServiceWorker(&self) -> Root<ServiceWorkerContainer> {
self.service_worker.or_init(|| {
- ServiceWorkerContainer::new(self.global().r().as_global_scope())
+ ServiceWorkerContainer::new(&self.global_scope())
})
}