summaryrefslogtreecommitdiffstats
path: root/widget/nsPrinterBase.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /widget/nsPrinterBase.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/nsPrinterBase.cpp')
-rw-r--r--widget/nsPrinterBase.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/widget/nsPrinterBase.cpp b/widget/nsPrinterBase.cpp
index 7e01b9e12f..0c8f71d574 100644
--- a/widget/nsPrinterBase.cpp
+++ b/widget/nsPrinterBase.cpp
@@ -10,6 +10,7 @@
#include "nsIPrintSettings.h"
#include "nsPrintSettingsService.h"
#include "PrintBackgroundTask.h"
+#include "mozilla/EnumeratedArrayCycleCollection.h"
#include "mozilla/dom/Promise.h"
using namespace mozilla;
@@ -83,25 +84,6 @@ NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsPrinterInfo)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsPrinterInfo)
-template <typename Index, Index Size, typename Value>
-inline void ImplCycleCollectionTraverse(
- nsCycleCollectionTraversalCallback& aCallback,
- EnumeratedArray<Index, Size, Value>& aArray, const char* aName,
- uint32_t aFlags = 0) {
- aFlags |= CycleCollectionEdgeNameArrayFlag;
- for (Value& element : aArray) {
- ImplCycleCollectionTraverse(aCallback, element, aName, aFlags);
- }
-}
-
-template <typename Index, Index Size, typename Value>
-inline void ImplCycleCollectionUnlink(
- EnumeratedArray<Index, Size, Value>& aArray) {
- for (Value& element : aArray) {
- ImplCycleCollectionUnlink(element);
- }
-}
-
namespace mozilla {
template <>
@@ -143,8 +125,8 @@ nsresult nsPrinterBase::AsyncPromiseAttributeGetter(
BackgroundTask<T, Args...> aBackgroundTask, Args... aArgs) {
MOZ_ASSERT(NS_IsMainThread());
- static constexpr EnumeratedArray<AsyncAttribute, AsyncAttribute::Last,
- nsLiteralCString>
+ static constexpr EnumeratedArray<AsyncAttribute, nsLiteralCString,
+ size_t(AsyncAttribute::Last)>
attributeKeys{"SupportsDuplex"_ns, "SupportsColor"_ns,
"SupportsMonochrome"_ns, "SupportsCollation"_ns,
"PrinterInfo"_ns};