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

Unified Diff: src/allocation.h

Issue 6749029: Make the preparser standalone library and process build in debug mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comment. Created 9 years, 9 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 | src/allocation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/allocation.h
diff --git a/src/allocation.h b/src/allocation.h
index d7bbbb8769cacd530e7567298a127e42f0fc2c51..75aba35d8cfcf0a4111cda2a8321693eb6372c7b 100644
--- a/src/allocation.h
+++ b/src/allocation.h
@@ -39,25 +39,6 @@ namespace internal {
// processing.
void FatalProcessOutOfMemory(const char* message);
-// A class that controls whether allocation is allowed. This is for
-// the C++ heap only!
-class NativeAllocationChecker {
- public:
- enum NativeAllocationAllowed { ALLOW, DISALLOW };
-#ifdef DEBUG
- explicit NativeAllocationChecker(NativeAllocationAllowed allowed);
- ~NativeAllocationChecker();
- static bool allocation_allowed();
- private:
- // This flag applies to this particular instance.
- NativeAllocationAllowed allowed_;
-#else
- explicit inline NativeAllocationChecker(NativeAllocationAllowed allowed) {}
- static inline bool allocation_allowed() { return true; }
-#endif
-};
-
-
// Superclass for classes managed with new & delete.
class Malloced {
public:
@@ -101,7 +82,6 @@ class AllStatic {
template <typename T>
static T* NewArray(int size) {
- ASSERT(NativeAllocationChecker::allocation_allowed());
T* result = new T[size];
if (result == NULL) Malloced::FatalProcessOutOfMemory();
return result;
« no previous file with comments | « no previous file | src/allocation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698