Bug 1356392 - Use a release assert in EnumSerializer::Write. r=kanru
authorAndrew McCreight <continuation@gmail.com>
Thu, 13 Apr 2017 13:55:10 -0700
changeset 353071 31430ca292f20731880b4b0035c72b74c95e9b19
parent 353070 31efcf6136159b6d670c37916f9bc6b447c8be7f
child 353072 e8e2593692a51149373b2645e69a4d22b99fc466
push id31656
push userihsiao@mozilla.com
push dateFri, 14 Apr 2017 09:10:41 +0000
treeherdermozilla-central@cda24082bff8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskanru
bugs1356392
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1356392 - Use a release assert in EnumSerializer::Write. r=kanru MozReview-Commit-ID: JqnwuT3nn9q
ipc/glue/IPCMessageUtils.h
--- 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"),