From 22e2874bf6412144ab4b51b95327306ef9609b2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:02:55 +0200 Subject: Merging upstream version 126.0.1. Signed-off-by: Daniel Baumann --- dom/indexedDB/IDBFactory.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'dom/indexedDB/IDBFactory.cpp') 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 IDBFactory::DeleteDatabase( /* aDeleting */ true, aCallerType, aRv); } -already_AddRefed IDBFactory::Databases(JSContext* const aCx) { +already_AddRefed 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::CreateInfallible(GetOwnerGlobal()); // Nothing can be done here if we have previously failed to create a -- cgit v1.2.3