mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
indexeddb: Allow deleting unknown DBs. (#38076)
The current behaviour is too strict according to the spec and is the cause of many intermittent test errors. Testing: Existing coverage is sufficient. Fixes: #37706 --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
30b6e289e0
commit
189e649222
7 changed files with 19 additions and 26 deletions
|
@ -297,11 +297,17 @@ impl IndexedDBManager {
|
|||
}
|
||||
},
|
||||
SyncOperation::DeleteDatabase(sender, origin, db_name) => {
|
||||
// https://w3c.github.io/IndexedDB/#delete-a-database
|
||||
// Step 4. Let db be the database named name in storageKey,
|
||||
// if one exists. Otherwise, return 0 (zero).
|
||||
let idb_description = IndexedDBDescription {
|
||||
origin,
|
||||
name: db_name,
|
||||
};
|
||||
self.databases.remove(&idb_description);
|
||||
if self.databases.remove(&idb_description).is_none() {
|
||||
let _ = sender.send(Ok(()));
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME:(rasviitanen) Possible security issue?
|
||||
// FIXME:(arihant2math) using remove_dir_all with arbitrary input ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue