src: move ABORT() logic into node::Abort() · nodejs/node@b8919b1 · GitHub
Skip to content

Commit b8919b1

Browse files
bnoordhuisFishrock123
authored andcommitted
src: move ABORT() logic into node::Abort()
Don't inline calls to node::DumpBacktrace() and fflush(), it makes the generated code bigger. A secondary benefit of moving it to a function is that it gives you something to put a breakpoint on. PR-URL: #6734 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 517e715 commit b8919b1

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

src/node.cc

Lines changed: 8 additions & 1 deletion

src/node_internals.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,10 @@ constexpr size_t arraysize(const T(&)[N]) { return N; }
134134
# define ROUND_UP(a, b) ((a) % (b) ? ((a) + (b)) - ((a) % (b)) : (a))
135135
#endif
136136

137-
#if defined(__GNUC__) && __GNUC__ >= 4
137+
#ifdef __GNUC__
138138
# define MUST_USE_RESULT __attribute__((warn_unused_result))
139-
# define NO_RETURN __attribute__((noreturn))
140139
#else
141140
# define MUST_USE_RESULT
142-
# define NO_RETURN
143141
#endif
144142

145143
bool IsExceptionDecorated(Environment* env, v8::Local<v8::Value> er);

src/util.h

Lines changed: 8 additions & 6 deletions

0 commit comments

Comments
 (0)