Commit bd17b097 authored by Maciej Goszczycki's avatar Maciej Goszczycki Committed by Commit Bot

[heap] Move and clarify TODO on RO_SPACE

Bug: v8:7464
Change-Id: I1b33bfff02ccd1ae19f0525e8ab0f8bfe69abe17
Reviewed-on: https://chromium-review.googlesource.com/c/1451933Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#59348}
parent 73dd9b55
......@@ -650,7 +650,6 @@ typedef bool (*WeakSlotCallbackWithHeap)(Heap* heap, FullObjectSlot pointer);
// NOTE: SpaceIterator depends on AllocationSpace enumeration values being
// consecutive.
enum AllocationSpace {
// TODO(v8:7464): Actually map this space's memory as read-only.
RO_SPACE, // Immortal, immovable and immutable objects,
NEW_SPACE, // Young generation semispaces for regular objects collected with
// Scavenger.
......
......@@ -3310,6 +3310,8 @@ void ReadOnlySpace::SetPermissionsForPages(PageAllocator::Permission access) {
// page allocator manually.
v8::PageAllocator* page_allocator =
memory_allocator->page_allocator(page->executable());
// TODO(v8:7464): Map the whole space's memory read only (do not ignore the
// first page).
CHECK(SetPermissions(page_allocator, page->address() + area_start_offset,
page->size() - area_start_offset, access));
}
......
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