diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 01:53:40 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 09:49:10 +0200 |
commit | f87c2a8d7616112ca924e30292db2d244cf87eec (patch) | |
tree | 7344afe7ec0ec1ac7d1d13f5385111ee9c4be332 /components/script/dom/workerglobalscope.rs | |
parent | 577370746e2ce3da7fa25a20b8e1bbeed319df65 (diff) | |
download | servo-f87c2a8d7616112ca924e30292db2d244cf87eec.tar.gz servo-f87c2a8d7616112ca924e30292db2d244cf87eec.zip |
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> 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.
Diffstat (limited to 'components/script/dom/workerglobalscope.rs')
-rw-r--r-- | components/script/dom/workerglobalscope.rs | 14 |
1 files changed, 7 insertions, 7 deletions
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<WorkerGlobalScope> { - Root::from_ref(self) + fn Self_(&self) -> DomRoot<WorkerGlobalScope> { + DomRoot::from_ref(self) } // https://html.spec.whatwg.org/multipage/#dom-workerglobalscope-location - fn Location(&self) -> Root<WorkerLocation> { + fn Location(&self) -> DomRoot<WorkerLocation> { 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<WorkerNavigator> { + fn Navigator(&self) -> DomRoot<WorkerNavigator> { self.navigator.or_init(|| WorkerNavigator::new(self)) } // https://html.spec.whatwg.org/multipage/#dfn-Crypto - fn Crypto(&self) -> Root<Crypto> { + fn Crypto(&self) -> DomRoot<Crypto> { self.upcast::<GlobalScope>().crypto() } @@ -316,7 +316,7 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope { } // https://w3c.github.io/hr-time/#the-performance-attribute - fn Performance(&self) -> Root<Performance> { + fn Performance(&self) -> DomRoot<Performance> { self.performance.or_init(|| { let global_scope = self.upcast::<GlobalScope>(); Performance::new(global_scope, |