mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
net: fix indexeddb backend bugs (#38744)
Fix a large number of backend issues that were masking everything else. There probably is still more, but it'll take more integration/unit testing to find it. Testing: WPT Fixes: #38743 --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
parent
f2294db95b
commit
d0a8f27241
15 changed files with 113 additions and 146 deletions
|
@ -12,8 +12,8 @@ use js::jsval::{DoubleValue, JSVal, UndefinedValue};
|
|||
use js::rust::HandleValue;
|
||||
use net_traits::IpcSend;
|
||||
use net_traits::indexeddb_thread::{
|
||||
AsyncOperation, BackendResult, IndexedDBKeyType, IndexedDBThreadMsg, IndexedDBTxnMode,
|
||||
PutItemResult,
|
||||
AsyncOperation, BackendError, BackendResult, IndexedDBKeyType, IndexedDBThreadMsg,
|
||||
IndexedDBTxnMode, PutItemResult,
|
||||
};
|
||||
use profile_traits::ipc::IpcReceiver;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -296,7 +296,11 @@ impl IDBRequest {
|
|||
let response_listener = response_listener.clone();
|
||||
task_source.queue(task!(request_callback: move || {
|
||||
response_listener.handle_async_request_finished(
|
||||
message.expect("Could not unwrap message").map(|t| t.into()));
|
||||
message.expect("Could not unwrap message").inspect_err(|e| {
|
||||
if let BackendError::DbErr(e) = e {
|
||||
error!("Error in IndexedDB operation: {}", e);
|
||||
}
|
||||
}).map(|t| t.into()));
|
||||
}));
|
||||
}),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue