Bug 1356392 - Use a release assert in EnumSerializer::Write. r=kanru
MozReview-Commit-ID: JqnwuT3nn9q
--- a/ipc/glue/IPCMessageUtils.h
+++ b/ipc/glue/IPCMessageUtils.h
@@ -115,17 +115,17 @@ static const uint32_t MAX_MESSAGE_SIZE =
*/
template <typename E, typename EnumValidator>
struct EnumSerializer {
typedef E paramType;
typedef typename mozilla::UnsignedStdintTypeForSize<sizeof(paramType)>::Type
uintParamType;
static void Write(Message* aMsg, const paramType& aValue) {
- MOZ_ASSERT(EnumValidator::IsLegalValue(aValue));
+ MOZ_RELEASE_ASSERT(EnumValidator::IsLegalValue(aValue));
WriteParam(aMsg, uintParamType(aValue));
}
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) {
uintParamType value;
if (!ReadParam(aMsg, aIter, &value)) {
#ifdef MOZ_CRASHREPORTER
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCReadErrorReason"),