mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
IndexedDB: communicate transaction errors and async response data more precisely (#38027)
Digging into several crashing tests revealed that committing transactions is a fallible operation. Propagating those errors led to exposing many new errors caused by the IDBRequest implementation assuming that all successful responses contained a structured clone. The end result is a bunch of new test failures that were previously hidden. Testing: Existing test coverage is sufficient. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
027954dbad
commit
312985faff
9 changed files with 196 additions and 51 deletions
|
@ -11,7 +11,7 @@ use std::thread;
|
|||
use ipc_channel::ipc::{self, IpcError, IpcReceiver, IpcSender};
|
||||
use log::{debug, warn};
|
||||
use net_traits::indexeddb_thread::{
|
||||
AsyncOperation, IndexedDBThreadMsg, IndexedDBTxnMode, SyncOperation,
|
||||
AsyncOperation, IdbResult, IndexedDBThreadMsg, IndexedDBTxnMode, SyncOperation,
|
||||
};
|
||||
use servo_config::pref;
|
||||
use servo_url::origin::ImmutableOrigin;
|
||||
|
@ -88,7 +88,7 @@ impl<E: KvsEngine> IndexedDBEnvironment<E> {
|
|||
|
||||
fn queue_operation(
|
||||
&mut self,
|
||||
sender: IpcSender<Option<Vec<u8>>>,
|
||||
sender: IpcSender<Result<Option<IdbResult>, ()>>,
|
||||
store_name: SanitizedName,
|
||||
serial_number: u64,
|
||||
mode: IndexedDBTxnMode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue