Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! src: use struct as arguments to node::Assert
  • Loading branch information
addaleax committed Feb 2, 2019
commit 9d404ba51f972fb9dc62c86bfdbd33604e070b41
5 changes: 2 additions & 3 deletions src/node_errors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,9 @@ void AppendExceptionLine(Environment* env,
GetHumanReadableProcessName(&name);

fprintf(stderr,
"%s: %s:%u:%s%s Assertion `%s' failed.\n",
"%s: %s:%s%s Assertion `%s' failed.\n",
name,
info.filename,
info.linenum,
info.file_line,
info.function,
*info.function ? ":" : "",
info.message);
Expand Down
5 changes: 2 additions & 3 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ void LowMemoryNotification();
// The reason that Assert() takes a struct argument instead of individual
// const char*s is to ease instruction cache pressure in calls from CHECK.
struct AssertionInfo {
const char* filename;
unsigned int linenum;
const char* file_line; // filename:line
const char* message;
const char* function;
};
Expand Down Expand Up @@ -129,7 +128,7 @@ void DumpBacktrace(FILE* fp);
/* Make sure that this struct does not end up in inline code, but */ \
/* rather in a read-only data section when modifying this code. */ \
static const node::AssertionInfo args = { \
__FILE__, __LINE__, #expr, PRETTY_FUNCTION_NAME \
__FILE__ ":" STRINGIFY(__LINE__), #expr, PRETTY_FUNCTION_NAME \
}; \
node::Assert(args); \
} \
Expand Down