Commit bfb0e514 authored by Mike Wasserman's avatar Mike Wasserman Committed by Commit Bot

Fix AXRemoteHost::SendEvent DCHECK when toggling ChromeVox with KSV app

Bug: 910224
Change-Id: Ie1d13e6d2c41b4096ce7912ba494db2fe468c678
Reviewed-on: https://chromium-review.googlesource.com/c/1355196Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612350}
parent 9f832ef1
......@@ -226,12 +226,12 @@ void AXRemoteHost::Disable() {
void AXRemoteHost::SendEvent(AXAuraObjWrapper* aura_obj,
ax::mojom::Event event_type) {
DCHECK(aura_obj);
if (!enabled_ || !widget_)
// Early return when this host is disabled or only partially initialized.
// This roughly matches the behavior in AutomationManagerAura::SendEvent.
// Toggling ChromeVox off does not disable the host, etc: crbug.com/910224
if (!enabled_ || !widget_ || !tree_serializer_ || !tree_source_)
return;
DCHECK(tree_source_);
DCHECK(tree_serializer_);
ui::AXTreeUpdate update;
if (!tree_serializer_->SerializeChanges(aura_obj, &update)) {
LOG(ERROR) << "Unable to serialize accessibility tree.";
......
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