Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index 37eb00485f7ae463aadeb41b3a5d3a6b4143a70b..b1fa445fa4aef2e0f54976a423f9dfd21acbadd3 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -4830,6 +4830,20 @@ bool Heap::InSpace(Address addr, AllocationSpace space) { |
| } |
| +bool Heap::IsValidAllocationSpace(AllocationSpace space) { |
| + switch (space) { |
| + case NEW_SPACE: |
| + case OLD_SPACE: |
| + case CODE_SPACE: |
| + case MAP_SPACE: |
| + case LO_SPACE: |
| + return true; |
| + default: |
| + return false; |
| + } |
| +} |
| + |
| + |
| bool Heap::RootIsImmortalImmovable(int root_index) { |
| switch (root_index) { |
| #define CASE(name) \ |