author | Kan-Ru Chen <kanru@kanru.info> |
Wed, 30 Mar 2016 12:32:26 +0800 | |
changeset 291848 | 9f0609cb275d1a0bb2916886e3f5b4c3644d9837 |
parent 291847 | 17030bff31b48f7cf992f7164d5f9769ba0fa4ef |
child 291849 | b0b19497c80c49c7f3fe259faf052fde16acf80c |
push id | 74697 |
push user | kchen@mozilla.com |
push date | Wed, 06 Apr 2016 08:48:51 +0000 |
treeherder | mozilla-inbound@9f0609cb275d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jld |
bugs | 1258312 |
milestone | 48.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
|
--- a/ipc/glue/IPCMessageUtils.h +++ b/ipc/glue/IPCMessageUtils.h @@ -20,16 +20,19 @@ #ifdef XP_WIN #include "mozilla/TimeStamp_windows.h" #endif #include "mozilla/TypeTraits.h" #include "mozilla/IntegerTypeTraits.h" #include <stdint.h> +#ifdef MOZ_CRASHREPORTER +#include "nsExceptionHandler.h" +#endif #include "nsID.h" #include "nsIWidget.h" #include "nsMemory.h" #include "nsString.h" #include "nsTArray.h" #include "js/StructuredClone.h" #include "nsCSSProperty.h" @@ -108,18 +111,27 @@ struct EnumSerializer { static void Write(Message* aMsg, const paramType& aValue) { MOZ_ASSERT(EnumValidator::IsLegalValue(aValue)); WriteParam(aMsg, uintParamType(aValue)); } static bool Read(const Message* aMsg, void** aIter, paramType* aResult) { uintParamType value; - if(!ReadParam(aMsg, aIter, &value) || - !EnumValidator::IsLegalValue(paramType(value))) { + if (!ReadParam(aMsg, aIter, &value)) { +#ifdef MOZ_CRASHREPORTER + CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCReadErrorReason"), + NS_LITERAL_CSTRING("Bad iter")); +#endif + return false; + } else if (!EnumValidator::IsLegalValue(paramType(value))) { +#ifdef MOZ_CRASHREPORTER + CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCReadErrorReason"), + NS_LITERAL_CSTRING("Illegal value")); +#endif return false; } *aResult = paramType(value); return true; } }; template <typename E,