Fix AxVirtualObject::AddChildren should set |have_children_|
CL:2356484 fixed an issue in AXVirtualObject::AddChildren where the parent should be set. As a follow up, this change also sets |have_children_| to true when adding children for AXVirtualObject. Consider the following call stack: AXVirtualObject::AddChildren AXObject::UpdateChildrenIfNecessary AXObject::ChildrenIncludingIgnored WebAXObject::ChildAt BlinkAXTreeSource::GetChildren AXObject::UpdateChildrenIfNecessary() relies on |have_children_| to check if there are new children and should be added. If we do not set |have_children_| to true in AXVirtualObjet::AddChildren(), the above call will keep adding children and expand the heap beyond allowed capacity triggering a check. AX-Relnotes:n/a Bug: 1149437 Change-Id: I973a73994bc59e47742ddfdd8c15c90d6c664421 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538354 Commit-Queue: Nektarios Paisios <nektar@chromium.org> Reviewed-by:Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#827921}
Showing
Please register or sign in to comment