Merge "Shave a stack frame off asserts."

This commit is contained in:
Elliott Hughes 2017-06-21 15:09:53 +00:00 committed by Gerrit Code Review
commit 199c27734f
2 changed files with 1 additions and 5 deletions

View File

@ -37,7 +37,7 @@ class ScopedSignalHandler {
template <class F>
void install(int signal, F&& f) {
MEM_LOG_ALWAYS_FATAL_IF(signal_ != -1, "ScopedSignalHandler already installed");
if (signal != -1) MEM_LOG_ALWAYS_FATAL("ScopedSignalHandler already installed");
handler_ = SignalFn(std::allocator_arg, allocator_,
[=](int signal, siginfo_t* si, void* uctx) { f(*this, signal, si, uctx); });

View File

@ -30,9 +30,6 @@
#define MEM_LOG_ALWAYS_FATAL(...) async_safe_fatal(__VA_ARGS__)
#define MEM_LOG_ALWAYS_FATAL_IF(cond, ...) \
((__predict_false(cond)) ? async_safe_fatal(__VA_ARGS__) : (void)0)
#else
#include <log/log.h>
@ -43,7 +40,6 @@
#define MEM_ALOGI ALOGI
#define MEM_LOG_ALWAYS_FATAL LOG_ALWAYS_FATAL
#define MEM_LOG_ALWAYS_FATAL_IF LOG_ALWAYS_FATAL_IF
#endif