mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
[IndexedDB] Reduce heed related panics (#37652)
Allows indexeddb backends to return errors on certain operations. Currently the errors are not demarcated, as the result type is `Result<(), ()>`. If this is not appropriate then perhaps having a string error might be better. Testing: Some tests might perhaps move from PANIC to FAIL Fixes: Partially fixes a bit of #37647, more work needs to be done however --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
72e0baa997
commit
d114feb0fa
5 changed files with 60 additions and 28 deletions
|
@ -57,12 +57,18 @@ pub struct KvsTransaction {
|
|||
}
|
||||
|
||||
pub trait KvsEngine {
|
||||
fn create_store(&self, store_name: SanitizedName, auto_increment: bool);
|
||||
type Error;
|
||||
|
||||
fn delete_store(&self, store_name: SanitizedName);
|
||||
fn create_store(
|
||||
&self,
|
||||
store_name: SanitizedName,
|
||||
auto_increment: bool,
|
||||
) -> Result<(), Self::Error>;
|
||||
|
||||
fn delete_store(&self, store_name: SanitizedName) -> Result<(), Self::Error>;
|
||||
|
||||
#[expect(dead_code)]
|
||||
fn close_store(&self, store_name: SanitizedName);
|
||||
fn close_store(&self, store_name: SanitizedName) -> Result<(), Self::Error>;
|
||||
|
||||
fn process_transaction(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue