| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index 304e1f86f0dffb70cc26f5d2eeab285cb1ae4a2a..3753c54596d4c47cdf6424ec09990866fbe97ed4 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -1491,10 +1491,6 @@ class Heap {
|
| allocation_timeout_ = timeout;
|
| }
|
|
|
| - bool disallow_allocation_failure() {
|
| - return disallow_allocation_failure_;
|
| - }
|
| -
|
| void TracePathToObjectFrom(Object* target, Object* root);
|
| void TracePathToObject(Object* target);
|
| void TracePathToGlobal();
|
| @@ -2004,10 +2000,6 @@ class Heap {
|
| // variable holds the value indicating the number of allocations
|
| // remain until the next failure and garbage collection.
|
| int allocation_timeout_;
|
| -
|
| - // Do we expect to be able to handle allocation failure at this
|
| - // time?
|
| - bool disallow_allocation_failure_;
|
| #endif // DEBUG
|
|
|
| // Indicates that the new space should be kept small due to high promotion
|
| @@ -2516,13 +2508,9 @@ class Heap {
|
| MemoryChunk* chunks_queued_for_free_;
|
|
|
| Mutex* relocation_mutex_;
|
| -#ifdef DEBUG
|
| - bool relocation_mutex_locked_by_optimizer_thread_;
|
| -#endif // DEBUG;
|
|
|
| friend class Factory;
|
| friend class GCTracer;
|
| - friend class DisallowAllocationFailure;
|
| friend class AlwaysAllocateScope;
|
| friend class Page;
|
| friend class Isolate;
|
| @@ -2572,26 +2560,15 @@ class HeapStats {
|
| };
|
|
|
|
|
| -class DisallowAllocationFailure {
|
| - public:
|
| - inline DisallowAllocationFailure();
|
| - inline ~DisallowAllocationFailure();
|
| -
|
| -#ifdef DEBUG
|
| - private:
|
| - bool old_state_;
|
| -#endif
|
| -};
|
| -
|
| -
|
| class AlwaysAllocateScope {
|
| public:
|
| - inline AlwaysAllocateScope();
|
| + explicit inline AlwaysAllocateScope(Isolate* isolate);
|
| inline ~AlwaysAllocateScope();
|
|
|
| private:
|
| // Implicitly disable artificial allocation failures.
|
| - DisallowAllocationFailure disallow_allocation_failure_;
|
| + Heap* heap_;
|
| + DisallowAllocationFailure daf_;
|
| };
|
|
|
|
|
|
|