| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 0a90c8f7da5d7887375a607041c0bfcb5d8d59f1..b87a26a85981e9fa1bfec629b90095eecfef65bd 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -1412,13 +1412,13 @@ class Heap {
|
| void UpdateSurvivalStatistics(int start_new_space_size);
|
|
|
| inline void IncrementPromotedObjectsSize(int object_size) {
|
| - DCHECK(object_size > 0);
|
| + DCHECK_GE(object_size, 0);
|
| promoted_objects_size_ += object_size;
|
| }
|
| inline intptr_t promoted_objects_size() { return promoted_objects_size_; }
|
|
|
| inline void IncrementSemiSpaceCopiedObjectSize(int object_size) {
|
| - DCHECK(object_size > 0);
|
| + DCHECK_GE(object_size, 0);
|
| semi_space_copied_object_size_ += object_size;
|
| }
|
| inline intptr_t semi_space_copied_object_size() {
|
| @@ -1928,6 +1928,16 @@ class Heap {
|
| void ScheduleIdleScavengeIfNeeded(int bytes_allocated);
|
|
|
| // ===========================================================================
|
| + // HeapIterator helpers. =====================================================
|
| + // ===========================================================================
|
| +
|
| + void heap_iterator_start() { heap_iterator_depth_++; }
|
| +
|
| + void heap_iterator_end() { heap_iterator_depth_--; }
|
| +
|
| + bool in_heap_iterator() { return heap_iterator_depth_ > 0; }
|
| +
|
| + // ===========================================================================
|
| // Allocation methods. =======================================================
|
| // ===========================================================================
|
|
|
| @@ -2380,6 +2390,9 @@ class Heap {
|
|
|
| ArrayBufferTracker* array_buffer_tracker_;
|
|
|
| + // The depth of HeapIterator nestings.
|
| + int heap_iterator_depth_;
|
| +
|
| // Used for testing purposes.
|
| bool force_oom_;
|
|
|
|
|