| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index bc46cc2cff46d51d2ebaed81bce29d7476d25560..8fb72dc6d9b45b9b82cd92db61873ba0524635f0 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -3316,8 +3316,11 @@ bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
|
|
|
|
|
| bool Heap::RootCanBeTreatedAsConstant(RootListIndex root_index) {
|
| - return !RootCanBeWrittenAfterInitialization(root_index) &&
|
| - !InNewSpace(roots_array_start()[root_index]);
|
| + if (!RootCanBeWrittenAfterInitialization(root_index)) {
|
| + DCHECK(!InNewSpace(roots_array_start()[root_index]));
|
| + return true;
|
| + }
|
| + return false;
|
| }
|
|
|
|
|
|
|