mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Initial IndexedDB Support (#33044)
Adds indexeddb support to servo. At the moment heed is being used as the backend, although this can be swapped out by implementing `KvsEngine`. This PR adds a thread + a thread pool for Indexeddb related operations. Also `database_access_task_source` is added for Indexeddb related operations. This is a partial rewrite of #25214. (Reopened due to branching issue) Fixes #6963 --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Rasmus Viitanen <rasviitanen@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
d33cf8fbd1
commit
ed9a79f3f4
259 changed files with 11141 additions and 8 deletions
|
@ -49,9 +49,12 @@ pub(crate) enum DOMErrorName {
|
|||
TimeoutError = DOMExceptionConstants::TIMEOUT_ERR,
|
||||
InvalidNodeTypeError = DOMExceptionConstants::INVALID_NODE_TYPE_ERR,
|
||||
DataCloneError = DOMExceptionConstants::DATA_CLONE_ERR,
|
||||
DataError,
|
||||
TransactionInactiveError,
|
||||
ReadOnlyError,
|
||||
VersionError,
|
||||
EncodingError,
|
||||
NotReadableError,
|
||||
DataError,
|
||||
OperationError,
|
||||
NotAllowedError,
|
||||
}
|
||||
|
@ -81,9 +84,12 @@ impl DOMErrorName {
|
|||
"TimeoutError" => Some(DOMErrorName::TimeoutError),
|
||||
"InvalidNodeTypeError" => Some(DOMErrorName::InvalidNodeTypeError),
|
||||
"DataCloneError" => Some(DOMErrorName::DataCloneError),
|
||||
"DataError" => Some(DOMErrorName::DataError),
|
||||
"TransactionInactiveError" => Some(DOMErrorName::TransactionInactiveError),
|
||||
"ReadOnlyError" => Some(DOMErrorName::ReadOnlyError),
|
||||
"VersionError" => Some(DOMErrorName::VersionError),
|
||||
"EncodingError" => Some(DOMErrorName::EncodingError),
|
||||
"NotReadableError" => Some(DOMErrorName::NotReadableError),
|
||||
"DataError" => Some(DOMErrorName::DataError),
|
||||
"OperationError" => Some(DOMErrorName::OperationError),
|
||||
"NotAllowedError" => Some(DOMErrorName::NotAllowedError),
|
||||
_ => None,
|
||||
|
@ -129,11 +135,20 @@ impl DOMException {
|
|||
"The supplied node is incorrect or has an incorrect ancestor for this operation."
|
||||
},
|
||||
DOMErrorName::DataCloneError => "The object can not be cloned.",
|
||||
DOMErrorName::DataError => "Provided data is inadequate.",
|
||||
DOMErrorName::TransactionInactiveError => {
|
||||
"A request was placed against a transaction which is currently not active, or which is finished."
|
||||
},
|
||||
DOMErrorName::ReadOnlyError => {
|
||||
"The mutating operation was attempted in a \"readonly\" transaction."
|
||||
},
|
||||
DOMErrorName::VersionError => {
|
||||
"An attempt was made to open a database using a lower version than the existing version."
|
||||
},
|
||||
DOMErrorName::EncodingError => {
|
||||
"The encoding operation (either encoded or decoding) failed."
|
||||
},
|
||||
DOMErrorName::NotReadableError => "The I/O read operation failed.",
|
||||
DOMErrorName::DataError => "Provided data is inadequate.",
|
||||
DOMErrorName::OperationError => {
|
||||
"The operation failed for an operation-specific reason."
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue