mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Initial IndexedDB Support (#33044)
Adds indexeddb support to servo. At the moment heed is being used as the backend, although this can be swapped out by implementing `KvsEngine`. This PR adds a thread + a thread pool for Indexeddb related operations. Also `database_access_task_source` is added for Indexeddb related operations. This is a partial rewrite of #25214. (Reopened due to branching issue) Fixes #6963 --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Rasmus Viitanen <rasviitanen@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
d33cf8fbd1
commit
ed9a79f3f4
259 changed files with 11141 additions and 8 deletions
|
@ -23,6 +23,7 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcReceiverSet, IpcSender};
|
|||
use log::{debug, trace, warn};
|
||||
use net_traits::blob_url_store::parse_blob_url;
|
||||
use net_traits::filemanager_thread::FileTokenCheck;
|
||||
use net_traits::indexeddb_thread::IndexedDBThreadMsg;
|
||||
use net_traits::pub_domains::public_suffix_list_size_of;
|
||||
use net_traits::request::{Destination, RequestBuilder, RequestId};
|
||||
use net_traits::response::{Response, ResponseInit};
|
||||
|
@ -56,6 +57,7 @@ use crate::filemanager_thread::FileManager;
|
|||
use crate::hsts::{self, HstsList};
|
||||
use crate::http_cache::HttpCache;
|
||||
use crate::http_loader::{HttpState, http_redirect_fetch};
|
||||
use crate::indexeddb::idb_thread::IndexedDBThreadFactory;
|
||||
use crate::protocols::ProtocolRegistry;
|
||||
use crate::request_interceptor::RequestInterceptor;
|
||||
use crate::storage_thread::StorageThreadFactory;
|
||||
|
@ -104,11 +106,12 @@ pub fn new_resource_threads(
|
|||
ignore_certificate_errors,
|
||||
protocols,
|
||||
);
|
||||
let idb: IpcSender<IndexedDBThreadMsg> = IndexedDBThreadFactory::new(config_dir.clone());
|
||||
let storage: IpcSender<StorageThreadMsg> =
|
||||
StorageThreadFactory::new(config_dir, mem_profiler_chan);
|
||||
(
|
||||
ResourceThreads::new(public_core, storage.clone()),
|
||||
ResourceThreads::new(private_core, storage),
|
||||
ResourceThreads::new(public_core, storage.clone(), idb.clone()),
|
||||
ResourceThreads::new(private_core, storage, idb),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue