indexeddb: Support enabling IndexedDB after startup (#39177)

The servodriver harness requires preference-gated web platform features
to be toggleable at any point in the browsing session's lifetime, rather
than at startup. To support toggling IndexedDB, we need to ensure the
IDB manager thread is always started.

Testing: Verified when running `./mach test-wpt /IndexedDB --headless
--product servodriver`. We don't run servodriver in CI yet.
Fixes: #39175

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-09-06 02:55:20 -04:00 committed by GitHub
parent b5d6555238
commit c490033c52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 11 deletions

View file

@ -58,7 +58,9 @@ impl IDBFactoryMethods<crate::DomTypeHolder> for IDBFactory {
let request = IDBOpenDBRequest::new(&self.global(), CanGc::note());
// Step 5: Runs in parallel
request.open_database(name, version);
if request.open_database(name, version).is_err() {
return Err(Error::Operation);
}
// Step 6
Ok(request)
@ -81,7 +83,9 @@ impl IDBFactoryMethods<crate::DomTypeHolder> for IDBFactory {
let request = IDBOpenDBRequest::new(&self.global(), CanGc::note());
// Step 4: Runs in parallel
request.delete_database(name.to_string());
if request.delete_database(name.to_string()).is_err() {
return Err(Error::Operation);
}
// Step 5: Return request
Ok(request)