mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Introduce GlobalScope::as_window
This commit is contained in:
parent
2f54022761
commit
766010379e
22 changed files with 30 additions and 43 deletions
|
@ -44,9 +44,7 @@ impl Storage {
|
|||
}
|
||||
|
||||
fn get_storage_thread(&self) -> IpcSender<StorageThreadMsg> {
|
||||
let global_root = self.global();
|
||||
let global_ref = global_root.r();
|
||||
global_ref.as_window().resource_threads().sender()
|
||||
self.global_scope().as_window().resource_threads().sender()
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -154,7 +152,7 @@ impl Storage {
|
|||
new_value: Option<String>) {
|
||||
let global_root = self.global();
|
||||
let global_ref = global_root.r();
|
||||
let window = global_ref.as_window();
|
||||
let window = global_ref.as_global_scope().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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue