mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Urlmageddon: Use refcounted urls more often.
This commit is contained in:
parent
f14e7339b5
commit
913c874cb5
161 changed files with 1044 additions and 718 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use url::Url;
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
#[derive(Copy, Clone, Deserialize, Serialize, HeapSizeOf)]
|
||||
pub enum StorageType {
|
||||
|
@ -15,25 +15,25 @@ pub enum StorageType {
|
|||
#[derive(Deserialize, Serialize)]
|
||||
pub enum StorageThreadMsg {
|
||||
/// gets the number of key/value pairs present in the associated storage data
|
||||
Length(IpcSender<usize>, Url, StorageType),
|
||||
Length(IpcSender<usize>, ServoUrl, StorageType),
|
||||
|
||||
/// gets the name of the key at the specified index in the associated storage data
|
||||
Key(IpcSender<Option<String>>, Url, StorageType, u32),
|
||||
Key(IpcSender<Option<String>>, ServoUrl, StorageType, u32),
|
||||
|
||||
/// Gets the available keys in the associated storage data
|
||||
Keys(IpcSender<Vec<String>>, Url, StorageType),
|
||||
Keys(IpcSender<Vec<String>>, ServoUrl, StorageType),
|
||||
|
||||
/// gets the value associated with the given key in the associated storage data
|
||||
GetItem(IpcSender<Option<String>>, Url, StorageType, String),
|
||||
GetItem(IpcSender<Option<String>>, ServoUrl, StorageType, String),
|
||||
|
||||
/// sets the value of the given key in the associated storage data
|
||||
SetItem(IpcSender<Result<(bool, Option<String>), ()>>, Url, StorageType, String, String),
|
||||
SetItem(IpcSender<Result<(bool, Option<String>), ()>>, ServoUrl, StorageType, String, String),
|
||||
|
||||
/// removes the key/value pair for the given key in the associated storage data
|
||||
RemoveItem(IpcSender<Option<String>>, Url, StorageType, String),
|
||||
RemoveItem(IpcSender<Option<String>>, ServoUrl, StorageType, String),
|
||||
|
||||
/// clears the associated storage data by removing all the key/value pairs
|
||||
Clear(IpcSender<bool>, Url, StorageType),
|
||||
Clear(IpcSender<bool>, ServoUrl, StorageType),
|
||||
|
||||
/// send a reply when done cleaning up thread resources and then shut it down
|
||||
Exit(IpcSender<()>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue