From f87c2a8d7616112ca924e30292db2d244cf87eec Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 26 Sep 2017 01:53:40 +0200 Subject: Rename Root to DomRoot In a later PR, DomRoot will become a type alias of Root>, where Root will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned. --- components/script/dom/workerglobalscope.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'components/script/dom/workerglobalscope.rs') diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs index 252be0f3bf1..ca7e2c3b7a9 100644 --- a/components/script/dom/workerglobalscope.rs +++ b/components/script/dom/workerglobalscope.rs @@ -10,7 +10,7 @@ use dom::bindings::codegen::UnionTypes::RequestOrUSVString; use dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception}; use dom::bindings::inheritance::Castable; use dom::bindings::reflector::DomObject; -use dom::bindings::root::{MutNullableDom, Root}; +use dom::bindings::root::{DomRoot, MutNullableDom}; use dom::bindings::settings_stack::AutoEntryScript; use dom::bindings::str::DOMString; use dom::bindings::trace::RootedTraceableBox; @@ -170,12 +170,12 @@ impl WorkerGlobalScope { impl WorkerGlobalScopeMethods for WorkerGlobalScope { // https://html.spec.whatwg.org/multipage/#dom-workerglobalscope-self - fn Self_(&self) -> Root { - Root::from_ref(self) + fn Self_(&self) -> DomRoot { + DomRoot::from_ref(self) } // https://html.spec.whatwg.org/multipage/#dom-workerglobalscope-location - fn Location(&self) -> Root { + fn Location(&self) -> DomRoot { self.location.or_init(|| { WorkerLocation::new(self, self.worker_url.clone()) }) @@ -236,12 +236,12 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope { } // https://html.spec.whatwg.org/multipage/#dom-worker-navigator - fn Navigator(&self) -> Root { + fn Navigator(&self) -> DomRoot { self.navigator.or_init(|| WorkerNavigator::new(self)) } // https://html.spec.whatwg.org/multipage/#dfn-Crypto - fn Crypto(&self) -> Root { + fn Crypto(&self) -> DomRoot { self.upcast::().crypto() } @@ -316,7 +316,7 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope { } // https://w3c.github.io/hr-time/#the-performance-attribute - fn Performance(&self) -> Root { + fn Performance(&self) -> DomRoot { self.performance.or_init(|| { let global_scope = self.upcast::(); Performance::new(global_scope, -- cgit v1.2.3