Commit 8611fb1b authored by Anton Bikineev's avatar Anton Bikineev Committed by Commit Bot

blink: Fix regressions caused by delayed destruction of heap containers

This fixes EventsDispatchingInDeeplyNestedV1ShadowTrees regressions in
blink_perf.events.

Bug: 1003112
Change-Id: I7e5feed395cf9232d576940594a2432e14d5d55d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809304
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697535}
parent 78d3c701
......@@ -275,6 +275,10 @@ void EventPath::RetargetRelatedTarget(const Node& related_target_node) {
DCHECK(adjusted_related_target);
tree_scope_event_context.Get()->SetRelatedTarget(*adjusted_related_target);
}
// Explicitly clear the heap container to avoid memory regressions in the hot
// path.
// TODO(bikineev): Revisit after young generation is there.
related_node_map.clear();
}
namespace {
......@@ -372,6 +376,10 @@ void EventPath::AdjustTouchList(
adjusted_touch_list[j]->Append(touch.CloneWithNewTarget(
FindRelatedNode(*tree_scopes[j], related_node_map)));
}
// Explicitly clear the heap container to avoid memory regressions in the
// hot path.
// TODO(bikineev): Revisit after young generation is there.
related_node_map.clear();
}
}
......
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