diff --git a/devtools/shared/indexed-db.js b/devtools/shared/indexed-db.js index 2dda1f808480..23d75116005c 100644 --- a/devtools/shared/indexed-db.js +++ b/devtools/shared/indexed-db.js @@ -35,9 +35,6 @@ module.exports = Object.freeze({ return indexedDB.openForPrincipal(principal, name, options); }, - /** - * Only the standard version of indexedDB.deleteDatabase is supported. - */ deleteDatabase(name) { return indexedDB.deleteForPrincipal(principal, name); }, diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp index e93990cb9333..ee30b123fd4b 100644 --- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -391,9 +391,10 @@ RefPtr IDBFactory::Open(JSContext* aCx, /* aDeleting */ false, aCallerType, aRv); } -RefPtr IDBFactory::DeleteDatabase( - JSContext* aCx, const nsAString& aName, const IDBOpenDBOptions& aOptions, - CallerType aCallerType, ErrorResult& aRv) { +RefPtr IDBFactory::DeleteDatabase(JSContext* aCx, + const nsAString& aName, + CallerType aCallerType, + ErrorResult& aRv) { return OpenInternal(aCx, /* aPrincipal */ nullptr, aName, Optional(), /* aDeleting */ true, aCallerType, aRv); diff --git a/dom/indexedDB/IDBFactory.h b/dom/indexedDB/IDBFactory.h index ff8c9c3fb023..6d71acf8db5d 100644 --- a/dom/indexedDB/IDBFactory.h +++ b/dom/indexedDB/IDBFactory.h @@ -151,9 +151,10 @@ class IDBFactory final : public GlobalTeardownObserver, public nsWrapperCache { const Optional& aVersion, CallerType aCallerType, ErrorResult& aRv); - [[nodiscard]] RefPtr DeleteDatabase( - JSContext* aCx, const nsAString& aName, const IDBOpenDBOptions& aOptions, - CallerType aCallerType, ErrorResult& aRv); + [[nodiscard]] RefPtr DeleteDatabase(JSContext* aCx, + const nsAString& aName, + CallerType aCallerType, + ErrorResult& aRv); already_AddRefed Databases(JSContext* aCx); diff --git a/dom/webidl/IDBFactory.webidl b/dom/webidl/IDBFactory.webidl index fc4fb655accf..8b17cc4a9c79 100644 --- a/dom/webidl/IDBFactory.webidl +++ b/dom/webidl/IDBFactory.webidl @@ -31,8 +31,7 @@ interface IDBFactory { [NewObject, Throws, NeedsCallerType] IDBOpenDBRequest - deleteDatabase(DOMString name, - optional IDBOpenDBOptions options = {}); + deleteDatabase(DOMString name); Promise> databases(); diff --git a/tools/@types/lib.gecko.dom.d.ts b/tools/@types/lib.gecko.dom.d.ts index 115ad529d5ca..bb1e11010494 100644 --- a/tools/@types/lib.gecko.dom.d.ts +++ b/tools/@types/lib.gecko.dom.d.ts @@ -17902,7 +17902,7 @@ interface IDBFactory { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/cmp) */ cmp(first: any, second: any): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/deleteDatabase) */ - deleteDatabase(name: string, options?: IDBOpenDBOptions): IDBOpenDBRequest; + deleteDatabase(name: string): IDBOpenDBRequest; deleteForPrincipal(principal: Principal, name: string, options?: IDBOpenDBOptions): IDBOpenDBRequest; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/open) */ open(name: string, version?: number): IDBOpenDBRequest;