mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Switch indexeddb backend to sqlite and improve IPC messaging (#38187)
- Use sqlite instead of heed. (one indexed database = one sqlite database) - Implement the backend for indexes - Use keyranges where needed (as specified by the spec) - Implement `getKey` - Fix channel error messaging (led to a bunch of changes to how async requests are handled) Note: `components/net/indexeddb/engines/sqlite/serialize.rs` is unused; I can delete it if needed. Testing: Switching to sqlite eliminated many panics (exposing some new failures). Fixes: #38040 --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
parent
f4bbdf8010
commit
fc3feceee5
59 changed files with 2002 additions and 818 deletions
|
@ -7,7 +7,7 @@ use ipc_channel::router::ROUTER;
|
|||
use js::jsval::UndefinedValue;
|
||||
use js::rust::HandleValue;
|
||||
use net_traits::IpcSend;
|
||||
use net_traits::indexeddb_thread::{IndexedDBThreadMsg, SyncOperation};
|
||||
use net_traits::indexeddb_thread::{BackendResult, IndexedDBThreadMsg, SyncOperation};
|
||||
use profile_traits::ipc;
|
||||
use script_bindings::conversions::SafeToJSValConvertible;
|
||||
use stylo_atoms::Atom;
|
||||
|
@ -84,7 +84,7 @@ impl OpenRequestListener {
|
|||
}
|
||||
}
|
||||
|
||||
fn handle_delete_db(&self, result: Result<(), ()>, can_gc: CanGc) {
|
||||
fn handle_delete_db(&self, result: BackendResult<()>, can_gc: CanGc) {
|
||||
let open_request = self.open_request.root();
|
||||
let global = open_request.global();
|
||||
open_request.idbrequest.set_ready_state_done();
|
||||
|
@ -108,7 +108,7 @@ impl OpenRequestListener {
|
|||
event.fire(open_request.upcast(), can_gc);
|
||||
},
|
||||
Err(_e) => {
|
||||
// FIXME(rasviitanen) Set the error of request to the
|
||||
// FIXME(arihant2math) Set the error of request to the
|
||||
// appropriate error
|
||||
|
||||
let event = Event::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue