diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:01:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:01:59 +0000 |
commit | 85310221f0512bf1aeefc49ead8a1e11bda55990 (patch) | |
tree | 70a3efbfee6c7cbeb626185b35166d2c376b4bb8 /dom/indexedDB/IDBFactory.cpp | |
parent | Adding upstream version 126.0. (diff) | |
download | firefox-85310221f0512bf1aeefc49ead8a1e11bda55990.tar.xz firefox-85310221f0512bf1aeefc49ead8a1e11bda55990.zip |
Adding upstream version 126.0.1.upstream/126.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/indexedDB/IDBFactory.cpp')
-rw-r--r-- | dom/indexedDB/IDBFactory.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp index 51d4c4df23..c0dc5aeab2 100644 --- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -470,7 +470,13 @@ RefPtr<IDBOpenDBRequest> IDBFactory::DeleteDatabase( /* aDeleting */ true, aCallerType, aRv); } -already_AddRefed<Promise> IDBFactory::Databases(JSContext* const aCx) { +already_AddRefed<Promise> IDBFactory::Databases(JSContext* const aCx, + ErrorResult& aRv) { + if (NS_WARN_IF(!GetOwnerGlobal())) { + aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); + return nullptr; + } + RefPtr<Promise> promise = Promise::CreateInfallible(GetOwnerGlobal()); // Nothing can be done here if we have previously failed to create a |