aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/storage.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/storage.rs')
-rw-r--r--components/script/dom/storage.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs
index 03747ed5ab6..11dfc3ab5d2 100644
--- a/components/script/dom/storage.rs
+++ b/components/script/dom/storage.rs
@@ -17,9 +17,8 @@ use dom::urlhelper::UrlHelper;
use ipc_channel::ipc::{self, IpcSender};
use net_traits::IpcSend;
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
-use script_thread::{MainThreadRunnable, ScriptThread};
+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::SendStorageNotification(
- box StorageEventRunnable::new(trusted_storage, key, old_value, new_value))).unwrap();
+ task_source.queue(box StorageEventRunnable::new(trusted_storage, key, old_value, new_value), window).unwrap();
}
}
@@ -180,8 +179,10 @@ impl StorageEventRunnable {
}
}
-impl MainThreadRunnable for StorageEventRunnable {
- fn handler(self: Box<StorageEventRunnable>, script_thread: &ScriptThread) {
+impl Runnable for StorageEventRunnable {
+ fn name(&self) -> &'static str { "StorageEventRunnable" }
+
+ fn main_thread_handler(self: Box<StorageEventRunnable>, script_thread: &ScriptThread) {
let this = *self;
let storage_root = this.element.root();
let storage = storage_root.r();