зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1890730 - Fix IDBFactory deleteDatabase to not use IDBOpenDBOptions. r=dom-storage-reviewers,webidl,smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D207168
This commit is contained in:
Родитель
3637d91f2c
Коммит
83f211d36f
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -391,9 +391,10 @@ RefPtr<IDBOpenDBRequest> IDBFactory::Open(JSContext* aCx,
|
|||
/* aDeleting */ false, aCallerType, aRv);
|
||||
}
|
||||
|
||||
RefPtr<IDBOpenDBRequest> IDBFactory::DeleteDatabase(
|
||||
JSContext* aCx, const nsAString& aName, const IDBOpenDBOptions& aOptions,
|
||||
CallerType aCallerType, ErrorResult& aRv) {
|
||||
RefPtr<IDBOpenDBRequest> IDBFactory::DeleteDatabase(JSContext* aCx,
|
||||
const nsAString& aName,
|
||||
CallerType aCallerType,
|
||||
ErrorResult& aRv) {
|
||||
return OpenInternal(aCx,
|
||||
/* aPrincipal */ nullptr, aName, Optional<uint64_t>(),
|
||||
/* aDeleting */ true, aCallerType, aRv);
|
||||
|
|
|
@ -151,9 +151,10 @@ class IDBFactory final : public GlobalTeardownObserver, public nsWrapperCache {
|
|||
const Optional<uint64_t>& aVersion, CallerType aCallerType,
|
||||
ErrorResult& aRv);
|
||||
|
||||
[[nodiscard]] RefPtr<IDBOpenDBRequest> DeleteDatabase(
|
||||
JSContext* aCx, const nsAString& aName, const IDBOpenDBOptions& aOptions,
|
||||
CallerType aCallerType, ErrorResult& aRv);
|
||||
[[nodiscard]] RefPtr<IDBOpenDBRequest> DeleteDatabase(JSContext* aCx,
|
||||
const nsAString& aName,
|
||||
CallerType aCallerType,
|
||||
ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<Promise> Databases(JSContext* aCx);
|
||||
|
||||
|
|
|
@ -31,8 +31,7 @@ interface IDBFactory {
|
|||
|
||||
[NewObject, Throws, NeedsCallerType]
|
||||
IDBOpenDBRequest
|
||||
deleteDatabase(DOMString name,
|
||||
optional IDBOpenDBOptions options = {});
|
||||
deleteDatabase(DOMString name);
|
||||
|
||||
Promise<sequence<IDBDatabaseInfo>> databases();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче