aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/storage.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-16 11:57:39 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-17 18:34:23 +0100
commit913c874cb55fd0fdc9e8f3a4c34624cd015fac8a (patch)
tree4526ecefafe0cde2f56cb1e2a4ebffd372e1f70a /components/script/dom/storage.rs
parentf14e7339b5ff95fce0127dce4fe87ce082ab7259 (diff)
downloadservo-913c874cb55fd0fdc9e8f3a4c34624cd015fac8a.tar.gz
servo-913c874cb55fd0fdc9e8f3a4c34624cd015fac8a.zip
Urlmageddon: Use refcounted urls more often.
Diffstat (limited to 'components/script/dom/storage.rs')
-rw-r--r--components/script/dom/storage.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs
index 3eb2b1ca844..6b85241e04f 100644
--- a/components/script/dom/storage.rs
+++ b/components/script/dom/storage.rs
@@ -18,8 +18,8 @@ use net_traits::IpcSend;
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
use script_thread::{Runnable, ScriptThread};
use script_traits::ScriptMsg;
+use servo_url::ServoUrl;
use task_source::TaskSource;
-use url::Url;
#[dom_struct]
pub struct Storage {
@@ -39,7 +39,7 @@ impl Storage {
reflect_dom_object(box Storage::new_inherited(storage_type), global, StorageBinding::Wrap)
}
- fn get_url(&self) -> Url {
+ fn get_url(&self) -> ServoUrl {
self.global().get_url()
}
@@ -158,7 +158,7 @@ impl Storage {
}
/// https://html.spec.whatwg.org/multipage/#send-a-storage-notification
- pub fn queue_storage_event(&self, url: Url,
+ pub fn queue_storage_event(&self, url: ServoUrl,
key: Option<String>, old_value: Option<String>, new_value: Option<String>) {
let global = self.global();
let window = global.as_window();
@@ -173,14 +173,14 @@ impl Storage {
pub struct StorageEventRunnable {
element: Trusted<Storage>,
- url: Url,
+ url: ServoUrl,
key: Option<String>,
old_value: Option<String>,
new_value: Option<String>
}
impl StorageEventRunnable {
- fn new(storage: Trusted<Storage>, url: Url,
+ fn new(storage: Trusted<Storage>, url: ServoUrl,
key: Option<String>, old_value: Option<String>, new_value: Option<String>) -> StorageEventRunnable {
StorageEventRunnable { element: storage, url: url, key: key, old_value: old_value, new_value: new_value }
}