Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: src/checks.h

Issue 9295048: Inline an inline function into the CHECK macro (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/checks.h
diff --git a/src/checks.h b/src/checks.h
index d93d4510f6e8a1145e7e8a73300228661443d6a8..608aa148064b9fe6ba9cb297e9c738d9c57666da 100644
--- a/src/checks.h
+++ b/src/checks.h
@@ -51,20 +51,12 @@ extern "C" void V8_Fatal(const char* file, int line, const char* format, ...);
#endif
-// Used by the CHECK macro -- should not be called directly.
-inline void CheckHelper(const char* file,
- int line,
- const char* source,
- bool condition) {
- if (!condition)
- V8_Fatal(file, line, "CHECK(%s) failed", source);
-}
-
-
// The CHECK macro checks that the given condition is true; if not, it
// prints a message to stderr and aborts.
-#define CHECK(condition) do { \
- if (!(condition)) CheckHelper(__FILE__, __LINE__, #condition, false); \
+#define CHECK(condition) do { \
+ if (!(condition)) { \
+ V8_Fatal(__FILE__, __LINE__, "CHECK(%s) failed", #condition); \
+ } \
} while (0)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698