diff options
author | Chad Kimes <ckimes89@gmail.com> | 2016-01-10 23:08:55 -0500 |
---|---|---|
committer | Chad Kimes <ckimes89@gmail.com> | 2016-01-11 20:23:47 -0500 |
commit | ce6075825d9e21b9b59d7d7230268745c087d617 (patch) | |
tree | b51757a926deef4e0ac3271b798f0781c407b128 /components/script/dom/storage.rs | |
parent | 2703568227e9957f3e1d44c3a03646675a285bc3 (diff) | |
download | servo-ce6075825d9e21b9b59d7d7230268745c087d617.tar.gz servo-ce6075825d9e21b9b59d7d7230268745c087d617.zip |
Add global default method for Reflectable trait
Diffstat (limited to 'components/script/dom/storage.rs')
-rw-r--r-- | components/script/dom/storage.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs index 11e49b229ed..f3829ddec6a 100644 --- a/components/script/dom/storage.rs +++ b/components/script/dom/storage.rs @@ -5,11 +5,11 @@ use dom::bindings::codegen::Bindings::StorageBinding; use dom::bindings::codegen::Bindings::StorageBinding::StorageMethods; use dom::bindings::error::{Error, ErrorResult}; -use dom::bindings::global::{GlobalRef, global_root_from_reflector}; +use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; use dom::bindings::js::{Root, RootedReference}; use dom::bindings::refcounted::Trusted; -use dom::bindings::reflector::{Reflector, reflect_dom_object}; +use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object}; use dom::event::{Event, EventBubbles, EventCancelable}; use dom::storageevent::StorageEvent; use dom::urlhelper::UrlHelper; @@ -40,13 +40,13 @@ impl Storage { } fn get_url(&self) -> Url { - let global_root = global_root_from_reflector(self); + let global_root = self.global(); let global_ref = global_root.r(); global_ref.get_url() } fn get_storage_thread(&self) -> StorageThread { - let global_root = global_root_from_reflector(self); + let global_root = self.global(); let global_ref = global_root.r(); global_ref.as_window().storage_thread() } @@ -152,7 +152,7 @@ impl Storage { /// https://html.spec.whatwg.org/multipage/#send-a-storage-notification fn broadcast_change_notification(&self, key: Option<String>, old_value: Option<String>, new_value: Option<String>) { - let global_root = global_root_from_reflector(self); + let global_root = self.global(); let global_ref = global_root.r(); let main_script_chan = global_ref.as_window().main_thread_script_chan(); let script_chan = global_ref.dom_manipulation_thread_source(); @@ -181,7 +181,7 @@ impl MainThreadRunnable for StorageEventRunnable { let this = *self; let storage_root = this.element.root(); let storage = storage_root.r(); - let global_root = global_root_from_reflector(storage); + let global_root = storage.global(); let global_ref = global_root.r(); let ev_window = global_ref.as_window(); let ev_url = storage.get_url(); |