mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
script: correctly handle indexeddb backend errors (#38740)
Sets the indexeddb request error when the backend errors out. This also matches statements to the spec. Testing: Covered by WPT Fixes: General indexeddb --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
57f25d0a8a
commit
91b27d98a2
4 changed files with 49 additions and 24 deletions
|
@ -220,7 +220,7 @@ impl IDBOpenDBRequest {
|
|||
self.idbrequest.set_result(result);
|
||||
}
|
||||
|
||||
pub fn set_error(&self, error: Error, can_gc: CanGc) {
|
||||
pub fn set_error(&self, error: Option<Error>, can_gc: CanGc) {
|
||||
self.idbrequest.set_error(error, can_gc);
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ impl IDBOpenDBRequest {
|
|||
},
|
||||
Err(dom_exception) => {
|
||||
request.set_result(HandleValue::undefined());
|
||||
request.set_error(dom_exception, CanGc::note());
|
||||
request.set_error(Some(dom_exception), CanGc::note());
|
||||
let event = Event::new(
|
||||
&global,
|
||||
Atom::from("error"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue