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:
Ashwin Naren 2025-07-16 21:19:03 -07:00 committed by GitHub
parent e10466b4c4
commit f70a4eb4ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 314 additions and 299 deletions

View file

@ -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);
}
}