icecat: add release icecat-140.8.0-2 for aramo
This commit is contained in:
parent
d9a6c0aa96
commit
d570f39e11
616 changed files with 39955 additions and 33937 deletions
|
|
@ -102,19 +102,23 @@ static T safe_unverified(T val) {
|
|||
return val;
|
||||
}
|
||||
|
||||
template <typename E, E MinLegal, E MaxLegal>
|
||||
inline E enum_verifier(std::underlying_type_t<E> e) {
|
||||
using U = std::underlying_type_t<E>;
|
||||
MOZ_RELEASE_ASSERT(
|
||||
e >= static_cast<U>(MinLegal) && e <= static_cast<U>(MaxLegal),
|
||||
"unexpected enum value");
|
||||
return static_cast<E>(e);
|
||||
};
|
||||
|
||||
/* status_verifier is a type validator for XML_Status */
|
||||
inline enum XML_Status status_verifier(enum XML_Status s) {
|
||||
MOZ_RELEASE_ASSERT(s >= XML_STATUS_ERROR && s <= XML_STATUS_SUSPENDED,
|
||||
"unexpected status code");
|
||||
return s;
|
||||
inline XML_Status status_verifier(std::underlying_type_t<XML_Status> s) {
|
||||
return enum_verifier<XML_Status, XML_STATUS_ERROR, XML_STATUS_SUSPENDED>(s);
|
||||
}
|
||||
|
||||
/* error_verifier is a type validator for XML_Error */
|
||||
inline enum XML_Error error_verifier(enum XML_Error code) {
|
||||
MOZ_RELEASE_ASSERT(
|
||||
code >= XML_ERROR_NONE && code <= XML_ERROR_INVALID_ARGUMENT,
|
||||
"unexpected XML error code");
|
||||
return code;
|
||||
inline XML_Error error_verifier(std::underlying_type_t<XML_Error> code) {
|
||||
return enum_verifier<XML_Error, XML_ERROR_NONE, XML_ERROR_NOT_STARTED>(code);
|
||||
}
|
||||
|
||||
/* We use unverified_xml_string to just expose sandbox expat strings to IceCat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue