diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-04 15:49:48 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 21:35:52 +0200 |
commit | 44ca9f3d712e9b49681e9848db089a1c05c7ffff (patch) | |
tree | c4c5f0ea086d3859977d542bd337b6c3a60ef095 /components/script/dom/storage.rs | |
parent | 514819f37a12c79c0398863c2ef817c9a4337f56 (diff) | |
download | servo-44ca9f3d712e9b49681e9848db089a1c05c7ffff.tar.gz servo-44ca9f3d712e9b49681e9848db089a1c05c7ffff.zip |
Make TaskSource::queue take a &GlobalScope
Diffstat (limited to 'components/script/dom/storage.rs')
-rw-r--r-- | components/script/dom/storage.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs index f19ac5ebbb6..83d9ab4bf61 100644 --- a/components/script/dom/storage.rs +++ b/components/script/dom/storage.rs @@ -150,13 +150,14 @@ 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 = self.global(); - let global_ref = global_root.r(); - let window = global_ref.as_global_scope().as_window(); + let global = self.global_scope(); + let window = global.as_window(); let task_source = window.dom_manipulation_task_source(); let trusted_storage = Trusted::new(self); - task_source.queue(box StorageEventRunnable::new(trusted_storage, key, old_value, new_value), - global_ref).unwrap(); + task_source + .queue( + box StorageEventRunnable::new(trusted_storage, key, old_value, new_value), &global) + .unwrap(); } } |