| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 } | 767 } |
| 768 | 768 |
| 769 | 769 |
| 770 DisallowAllocationFailure::~DisallowAllocationFailure() { | 770 DisallowAllocationFailure::~DisallowAllocationFailure() { |
| 771 #ifdef DEBUG | 771 #ifdef DEBUG |
| 772 HEAP->disallow_allocation_failure_ = old_state_; | 772 HEAP->disallow_allocation_failure_ = old_state_; |
| 773 #endif | 773 #endif |
| 774 } | 774 } |
| 775 | 775 |
| 776 | 776 |
| 777 FlushEagerly::FlushEagerly() { |
| 778 old_state_ = HEAP->flush_eagerly(); |
| 779 HEAP->set_flush_eagerly(true); |
| 780 } |
| 781 |
| 782 |
| 783 FlushEagerly::~FlushEagerly() { |
| 784 HEAP->set_flush_eagerly(old_state_); |
| 785 } |
| 786 |
| 787 |
| 777 #ifdef DEBUG | 788 #ifdef DEBUG |
| 778 AssertNoAllocation::AssertNoAllocation() { | 789 AssertNoAllocation::AssertNoAllocation() { |
| 779 Isolate* isolate = ISOLATE; | 790 Isolate* isolate = ISOLATE; |
| 780 active_ = !isolate->optimizing_compiler_thread()->IsOptimizerThread(); | 791 active_ = !isolate->optimizing_compiler_thread()->IsOptimizerThread(); |
| 781 if (active_) { | 792 if (active_) { |
| 782 old_state_ = isolate->heap()->allow_allocation(false); | 793 old_state_ = isolate->heap()->allow_allocation(false); |
| 783 } | 794 } |
| 784 } | 795 } |
| 785 | 796 |
| 786 | 797 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 808 AssertNoAllocation::~AssertNoAllocation() { } | 819 AssertNoAllocation::~AssertNoAllocation() { } |
| 809 DisableAssertNoAllocation::DisableAssertNoAllocation() { } | 820 DisableAssertNoAllocation::DisableAssertNoAllocation() { } |
| 810 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } | 821 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } |
| 811 | 822 |
| 812 #endif | 823 #endif |
| 813 | 824 |
| 814 | 825 |
| 815 } } // namespace v8::internal | 826 } } // namespace v8::internal |
| 816 | 827 |
| 817 #endif // V8_HEAP_INL_H_ | 828 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |