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

Unified Diff: src/allocation.h

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 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 | « src/accessors.cc ('k') | 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 aea0eb23c69f66a8b66a0776cebe999c6924c0b7..1645c7b3c335bce002bb5ce5b81c9d5449214b4a 100644
--- a/src/allocation.h
+++ b/src/allocation.h
@@ -40,13 +40,18 @@ void FatalProcessOutOfMemory(const char* message);
// the C++ heap only!
class NativeAllocationChecker {
public:
- typedef enum { ALLOW, DISALLOW } NativeAllocationAllowed;
- explicit inline NativeAllocationChecker(NativeAllocationAllowed allowed);
- inline ~NativeAllocationChecker();
- static inline bool allocation_allowed();
+ 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
};
« no previous file with comments | « src/accessors.cc ('k') | src/allocation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698