Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1931 // | 1931 // |
| 1932 // /* Allocation not allowed: we cannot handle a GC in this scope. */ | 1932 // /* Allocation not allowed: we cannot handle a GC in this scope. */ |
| 1933 // { AssertNoAllocation nogc; | 1933 // { AssertNoAllocation nogc; |
| 1934 // ... | 1934 // ... |
| 1935 // } | 1935 // } |
| 1936 | 1936 |
| 1937 #ifdef DEBUG | 1937 #ifdef DEBUG |
| 1938 | 1938 |
| 1939 class DisallowAllocationFailure { | 1939 class DisallowAllocationFailure { |
| 1940 public: | 1940 public: |
| 1941 DisallowAllocationFailure() { | 1941 explicit DisallowAllocationFailure() { |
|
Vitaly Repeshko
2011/04/21 21:15:27
nit: "explicit" not required and remove extra spac
| |
| 1942 old_state_ = HEAP->disallow_allocation_failure_; | 1942 old_state_ = HEAP->disallow_allocation_failure_; |
| 1943 HEAP->disallow_allocation_failure_ = true; | 1943 HEAP->disallow_allocation_failure_ = true; |
| 1944 } | 1944 } |
| 1945 ~DisallowAllocationFailure() { | 1945 ~DisallowAllocationFailure() { |
| 1946 HEAP->disallow_allocation_failure_ = old_state_; | 1946 HEAP->disallow_allocation_failure_ = old_state_; |
| 1947 } | 1947 } |
| 1948 private: | 1948 private: |
| 1949 bool old_state_; | 1949 bool old_state_; |
| 1950 }; | 1950 }; |
| 1951 | 1951 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2255 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2255 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2256 }; | 2256 }; |
| 2257 #endif // DEBUG || LIVE_OBJECT_LIST | 2257 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2258 | 2258 |
| 2259 | 2259 |
| 2260 } } // namespace v8::internal | 2260 } } // namespace v8::internal |
| 2261 | 2261 |
| 2262 #undef HEAP | 2262 #undef HEAP |
| 2263 | 2263 |
| 2264 #endif // V8_HEAP_H_ | 2264 #endif // V8_HEAP_H_ |
| OLD | NEW |