From 77126fb7413a0de2c83e60c0dc015b873d58bb82 Mon Sep 17 00:00:00 2001 From: Mirko Brodesser Date: Mon, 15 May 2023 12:55:11 +0000 Subject: [PATCH] Bug 1828674: part 1) Add TODO to statically assert `EnumTable`s shouldn't contain duplicate values. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D177763 --- dom/base/nsAttrValue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dom/base/nsAttrValue.h b/dom/base/nsAttrValue.h index 42f79569c72b..fccaa15831eb 100644 --- a/dom/base/nsAttrValue.h +++ b/dom/base/nsAttrValue.h @@ -329,6 +329,8 @@ class nsAttrValue { : tag(aTag), value(static_cast(aValue)) { static_assert(mozilla::EnumTypeFitsWithin::value, "aValue must be an enum that fits within int16_t"); + // TODO: statically assert there are no duplicate values, otherwise + // `GetEnumString()` above will return wrong values. } /** The string the value maps to */