Commit 7ad9980d authored by ishell's avatar ishell Committed by Commit bot

Avoid having untyped slots for objects embedded into code because it breaks slots filtering.

BUG=chromium:478747,chromium:478811
LOG=N

Review URL: https://codereview.chromium.org/1096053002

Cr-Commit-Position: refs/heads/master@{#27950}
parent 42415bf9
......@@ -4607,24 +4607,9 @@ void MarkCompactCollector::RecordRelocSlot(RelocInfo* rinfo, Object* target) {
if (target_page->IsEvacuationCandidate() &&
(rinfo->host() == NULL ||
!ShouldSkipEvacuationSlotRecording(rinfo->host()))) {
bool success;
if (RelocInfo::IsEmbeddedObject(rmode) && rinfo->IsInConstantPool()) {
// This doesn't need to be typed since it is just a normal heap pointer.
Object** target_pointer =
reinterpret_cast<Object**>(rinfo->constant_pool_entry_address());
success = SlotsBuffer::AddTo(
&slots_buffer_allocator_, target_page->slots_buffer_address(),
target_pointer, SlotsBuffer::FAIL_ON_OVERFLOW);
} else if (RelocInfo::IsCodeTarget(rmode) && rinfo->IsInConstantPool()) {
success = SlotsBuffer::AddTo(
&slots_buffer_allocator_, target_page->slots_buffer_address(),
SlotsBuffer::CODE_ENTRY_SLOT, rinfo->constant_pool_entry_address(),
SlotsBuffer::FAIL_ON_OVERFLOW);
} else {
success = SlotsBuffer::AddTo(
&slots_buffer_allocator_, target_page->slots_buffer_address(),
SlotTypeForRMode(rmode), rinfo->pc(), SlotsBuffer::FAIL_ON_OVERFLOW);
}
bool success = SlotsBuffer::AddTo(
&slots_buffer_allocator_, target_page->slots_buffer_address(),
SlotTypeForRMode(rmode), rinfo->pc(), SlotsBuffer::FAIL_ON_OVERFLOW);
if (!success) {
EvictPopularEvacuationCandidate(target_page);
}
......
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