summaryrefslogtreecommitdiffstats
path: root/dom/indexedDB
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:01 +0000
commit088c0cefd0f8b5482cc227955cc3057d47ec24b6 (patch)
tree05f2021c7dd804334bcb781bb0c4881e971cd8fe /dom/indexedDB
parentAdding debian version 126.0-1. (diff)
downloadfirefox-088c0cefd0f8b5482cc227955cc3057d47ec24b6.tar.xz
firefox-088c0cefd0f8b5482cc227955cc3057d47ec24b6.zip
Merging upstream version 126.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/indexedDB')
-rw-r--r--dom/indexedDB/IDBFactory.cpp8
-rw-r--r--dom/indexedDB/IDBFactory.h2
2 files changed, 8 insertions, 2 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
diff --git a/dom/indexedDB/IDBFactory.h b/dom/indexedDB/IDBFactory.h
index 7139b26f9c..d64d571a05 100644
--- a/dom/indexedDB/IDBFactory.h
+++ b/dom/indexedDB/IDBFactory.h
@@ -162,7 +162,7 @@ class IDBFactory final : public GlobalTeardownObserver, public nsWrapperCache {
JSContext* aCx, const nsAString& aName, const IDBOpenDBOptions& aOptions,
CallerType aCallerType, ErrorResult& aRv);
- already_AddRefed<Promise> Databases(JSContext* aCx);
+ already_AddRefed<Promise> Databases(JSContext* aCx, ErrorResult& aRv);
int16_t Cmp(JSContext* aCx, JS::Handle<JS::Value> aFirst,
JS::Handle<JS::Value> aSecond, ErrorResult& aRv);