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

Unified Diff: runtime/platform/globals.h

Issue 9241008: Remove dependency from platform/globals.h to platform/assert.h (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 7f8beed655a92956d0f4ceda56c1468466173c5a..5a8bb276f82eba044da250f822108e19d61664e5 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -40,13 +40,14 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <cstdlib>
+#include <sstream>
#if defined(_WIN32)
#include "platform/c99_support_win.h"
#include "platform/inttypes_support_win.h"
#endif
-
// Target OS detection.
// for more information on predefined macros:
// - http://msdn.microsoft.com/en-us/library/b0084kay.aspx
@@ -195,7 +196,12 @@ private: \
// in the private section for a class.
#define DISALLOW_ALLOCATION() \
public: \
- void operator delete(void* pointer) { UNREACHABLE(); } \
+ void operator delete(void* pointer) { \
+ /* Don't use UNREACHABLE here to avoid circular dependencies between \
Mads Ager (google) 2012/01/17 10:05:39 Move the comment above the macro definition and us
Søren Gjesse 2012/01/17 10:09:26 Done.
+ platform/globals.h and platform/assert.h. */ \
+ fprintf(stderr, "unreachable code\n"); \
+ std::abort(); \
+ } \
private: \
void* operator new(size_t size);
« 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