Index: src/heap/spaces.h |
diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
index 94ab4dc513e1bb296ccd7d5bb05daa8b661345b7..dba29a29bdf0bdebb9adc1ee078d12d8bd3e4d60 100644 |
--- a/src/heap/spaces.h |
+++ b/src/heap/spaces.h |
@@ -2130,6 +2130,10 @@ class PagedSpace : public Space { |
// Slow path of AllocateRaw. This function is space-dependent. |
MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes); |
+ virtual bool ShouldForceOOM() { return force_oom_; } |
+ |
+ void SetForcedOOM(bool value) { force_oom_ = value; } |
+ |
int area_size_; |
// Accounting information for this space. |
@@ -2152,6 +2156,9 @@ class PagedSpace : public Space { |
// Mutex guarding any concurrent access to the space. |
base::Mutex space_mutex_; |
+ bool force_oom_; |
+ |
+ friend class CompactionSpace; |
friend class MarkCompactCollector; |
friend class PageIterator; |
@@ -2922,6 +2929,8 @@ class CompactionSpace : public PagedSpace { |
MUST_USE_RESULT HeapObject* SweepAndRetryAllocation( |
int size_in_bytes) override; |
+ |
+ bool ShouldForceOOM() override; |
}; |