Commit 414b841b authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[explicit isolates] Make IsDereferenceAllowed true for RO_SPACE

Since RO_SPACE objects can't move then IsDereferenceAllowed, just return
true for any objects in RO_SPACE.

R=leszeks

Bug: v8:7786
Change-Id: I67d2d8902a3c2196991bf57ba719c8b05220cdbb
Reviewed-on: https://chromium-review.googlesource.com/1138324Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54472}
parent 46a93c9e
......@@ -26,7 +26,9 @@ bool HandleBase::IsDereferenceAllowed(DereferenceCheckMode mode) const {
Object* object = *location_;
if (object->IsSmi()) return true;
HeapObject* heap_object = HeapObject::cast(object);
Heap* heap = heap_object->GetHeap();
MemoryChunk* chunk = MemoryChunk::FromHeapObject(heap_object);
if (chunk->owner()->identity() == RO_SPACE) return true;
Heap* heap = chunk->heap();
Object** roots_array_start = heap->roots_array_start();
if (roots_array_start <= location_ &&
location_ < roots_array_start + Heap::kStrongRootListLength &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment