summaryrefslogtreecommitdiffstats
path: root/dom/indexedDB/IDBFactory.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:55 +0000
commit22e2874bf6412144ab4b51b95327306ef9609b2c (patch)
tree977413f3f953a8838b52b432554e53707cf27777 /dom/indexedDB/IDBFactory.cpp
parentReleasing progress-linux version 126.0-1~progress7.99u1. (diff)
downloadfirefox-22e2874bf6412144ab4b51b95327306ef9609b2c.tar.xz
firefox-22e2874bf6412144ab4b51b95327306ef9609b2c.zip
Merging upstream version 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.cpp8
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