| 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
|
| };
|
|
|
|
|
|
|