Make all task source runnables cancellable

Implement all Runnable methods on CancellableRunnable to redirect to their inner runnable
This commit is contained in:
Connor Brewster 2016-07-11 22:59:53 -06:00
parent afc0ccb48d
commit 5f7324a9a5
14 changed files with 69 additions and 58 deletions

View file

@ -19,7 +19,6 @@ use net_traits::IpcSend;
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
use script_thread::{Runnable, ScriptThread};
use task_source::TaskSource;
use task_source::dom_manipulation::DOMManipulationTask;
use url::Url;
#[dom_struct]
@ -159,10 +158,10 @@ impl Storage {
new_value: Option<String>) {
let global_root = self.global();
let global_ref = global_root.r();
let task_source = global_ref.as_window().dom_manipulation_task_source();
let window = global_ref.as_window();
let task_source = window.dom_manipulation_task_source();
let trusted_storage = Trusted::new(self);
task_source.queue(DOMManipulationTask(
box StorageEventRunnable::new(trusted_storage, key, old_value, new_value))).unwrap();
task_source.queue(StorageEventRunnable::new(trusted_storage, key, old_value, new_value), window).unwrap();
}
}