Skip to content
Commit e12afd43 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Chromium LUCI CQ
Browse files

Documents must keep same AXObjectCache/AXTreeSerializer

A clever trick that was used to batch major document changes into a
single operation was to destroy the existing AXObjectCache. For
example, this was used for large-scale inertness changes, e.g. caused
by a dialog being toggled, or by a fullscreen mode toggle.

The unintended consequence of this was that a new AXTreeSerializer was
also created, which has logic to assume the first node it sees is
the root node. This wreaks havoc when the tree is deserialized, because
there is already a root node. The Unserialize() function assumes the
new root is correct and destroys the old root's subtree.

Follow-up: when we land tree consistency check, we could pass in a boolean value that is true when the serializer is new. Then on the
browser side, for new serializers, we can check that there aren't
any nodes already present.

Bug: 1421550
Change-Id: If36641435884445b692f249a7933c4af8ed94b48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4351150


Reviewed-by: default avatarMason Freed <masonf@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120044}
parent 7d4f8263
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment