mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Move common indexeddb methods out of dom implementations (#38101)
A lot of shared functions were scattered around the dom files; I moved them into `indexed_db.rs` for clarity. Fixes: Nothing to my knowledge, just a cleanup Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
parent
e10466b4c4
commit
f70a4eb4ff
8 changed files with 314 additions and 299 deletions
|
@ -30,6 +30,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::idbobjectstore::IDBObjectStore;
|
||||
use crate::dom::idbtransaction::IDBTransaction;
|
||||
use crate::dom::idbversionchangeevent::IDBVersionChangeEvent;
|
||||
use crate::indexed_db::is_valid_key_path;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -201,7 +202,7 @@ impl IDBDatabaseMethods<crate::DomTypeHolder> for IDBDatabase {
|
|||
|
||||
// Step 5
|
||||
if let Some(path) = key_path {
|
||||
if !IDBObjectStore::is_valid_key_path(path) {
|
||||
if !is_valid_key_path(path) {
|
||||
return Err(Error::Syntax);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue