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
|
@ -41,7 +41,7 @@ thread_local! {
|
|||
}
|
||||
|
||||
/// Error values that have no equivalent DOMException representation.
|
||||
enum JsEngineError {
|
||||
pub(crate) enum JsEngineError {
|
||||
/// An EMCAScript TypeError.
|
||||
Type(String),
|
||||
/// An ECMAScript RangeError.
|
||||
|
@ -94,7 +94,7 @@ pub(crate) fn throw_dom_exception(
|
|||
/// If possible, create a new DOMException representing the provided error.
|
||||
/// If no such DOMException exists, return a subset of the original error values
|
||||
/// that may need additional handling.
|
||||
fn create_dom_exception(
|
||||
pub(crate) fn create_dom_exception(
|
||||
global: &GlobalScope,
|
||||
result: Error,
|
||||
can_gc: CanGc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue