Commit 9ad14ba1 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[runtime] Do not update visitor id on completion of slack tracking.

Visitor id for JSObjects does not depend on the instance size.

BUG=chromium:694255

Change-Id: I6b4b559207609f4a4c19373572be6692a55c5187
Reviewed-on: https://chromium-review.googlesource.com/520763Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45650}
parent 93ae3a36
......@@ -12128,14 +12128,15 @@ static void GetMinInobjectSlack(Map* map, void* data) {
static void ShrinkInstanceSize(Map* map, void* data) {
#ifdef DEBUG
int old_visitor_id = Heap::GetStaticVisitorIdForMap(map);
#endif
int slack = *reinterpret_cast<int*>(data);
map->SetInObjectProperties(map->GetInObjectProperties() - slack);
map->set_unused_property_fields(map->unused_property_fields() - slack);
map->set_instance_size(map->instance_size() - slack * kPointerSize);
map->set_construction_counter(Map::kNoSlackTracking);
// Visitor id might depend on the instance size, recalculate it.
map->set_visitor_id(Heap::GetStaticVisitorIdForMap(map));
DCHECK_EQ(old_visitor_id, Heap::GetStaticVisitorIdForMap(map));
}
static void StopSlackTracking(Map* map, void* data) {
......
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