Send abbreviated accessible bundles with accessibility events

RESOLVED FIXED in Firefox 64

Status

()

enhancement
RESOLVED FIXED
9 months ago
8 months ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

unspecified
mozilla65
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed, firefox65 fixed)

Details

Attachments

(2 attachments)

We currently send a full accessible bundle with each accessibility event. We use this bundle on the java side to populate fields in AccessibilityEvent that are related to the event's source, and not to populate a full AccessibilityNodeInfo.

This costs us several more sync IPC round trips that we don't need. It would be better to have a smaller bundle with the source's text/name, class name, and boolean flags. We don't need to get bounds, attributes, or anything further.
Depends on: 1499188, 1499182
This refactor does a few things:
1. Unifies the composition of the GeckoBundle, so that some tricky edge
cases don't need to be implemented twice.
2. Allows us to be more frugal with round trip sync ipc calls. Instead
of retrieving everything from the start, only progressivley retrieve
what we need.
3. Sets the groundwork for the next patch that will return from this
function earlier with a smaller bundle.
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/89663382dd1e
Refactor AccessibleWrap::ToBundle 1/2. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/7d3a598c1285
Send abbreviated source bundles with accessibility events. r=Jamie
Backout by aiakab@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/889b103b4e31
Backed out changeset 7d3a598c1285 ,for Android build bustages on AccessibleWrap.cpp:416
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4b8f36f9896b
Refactor AccessibleWrap::ToBundle 1/2. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/12527d50a493
Send abbreviated source bundles with accessibility events. r=Jamie
Sorry about that. Third time's a charm.
Flags: needinfo?(eitan)
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6a22bf58801f
Refactor AccessibleWrap::ToBundle 1/2. r=Jamie
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8d88737a20e
Send abbreviated source bundles with accessibility events. r=Jamie
Backed out 2 changesets (bug 1499209) for Accessibility crashes [@ mozilla::a11y::Accessible::Proxy() const] on a CLOSED TREE

Backout link: https://hg.mozilla.org/integration/autoland/rev/e1daa7729f92b1b5597f7d41d76c823296f2939d

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=c8d88737a20ef4975399bd8825f5519ac378d6c9&selectedJob=206728912

Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=206728912&repo=autoland&lineNumber=1368

Log snippet: 

[task 2018-10-20T00:18:29.280Z] 00:18:29     INFO -  REFTEST TEST-START | http://10.0.2.2:8854/tests/accessible/tests/crashtests/448064.xhtml
[task 2018-10-20T00:18:29.281Z] 00:18:29     INFO -  REFTEST TEST-LOAD | http://10.0.2.2:8854/tests/accessible/tests/crashtests/448064.xhtml | 2 / 366 (0%)
[task 2018-10-20T00:19:00.132Z] 00:19:00     INFO -  wait for org.mozilla.fennec_aurora complete; top activity=com.android.launcher
[task 2018-10-20T00:19:00.336Z] 00:19:00     INFO -  INFO | automation.py | Application ran for: 0:03:56.726425
[task 2018-10-20T00:19:00.336Z] 00:19:00     INFO -  INFO | zombiecheck | Reading PID log: /tmp/tmpQBWRXipidlog
[task 2018-10-20T00:19:00.851Z] 00:19:00     INFO -  /data/tombstones does not exist; tombstone check skipped
[task 2018-10-20T00:19:01.669Z] 00:19:01     INFO -  REFTEST INFO | Copy/paste: /usr/local/bin/linux64-minidump_stackwalk /tmp/tmpjuFjox/5df82e11-7a31-50e5-4f11-6d462c2df433.dmp /builds/worker/workspace/build/symbols
[task 2018-10-20T00:19:12.555Z] 00:19:12     INFO -  REFTEST INFO | Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/5df82e11-7a31-50e5-4f11-6d462c2df433.dmp
[task 2018-10-20T00:19:12.556Z] 00:19:12     INFO -  REFTEST INFO | Saved app info as /builds/worker/workspace/build/blobber_upload_dir/5df82e11-7a31-50e5-4f11-6d462c2df433.extra
[task 2018-10-20T00:19:12.559Z] 00:19:12     INFO -  REFTEST PROCESS-CRASH | http://10.0.2.2:8854/tests/accessible/tests/crashtests/448064.xhtml | application crashed [@ mozilla::a11y::Accessible::Proxy() const]
[task 2018-10-20T00:19:12.563Z] 00:19:12     INFO -  Crash dump filename: /tmp/tmpjuFjox/5df82e11-7a31-50e5-4f11-6d462c2df433.dmp
[task 2018-10-20T00:19:12.563Z] 00:19:12     INFO -  Operating system: Android
[task 2018-10-20T00:19:12.563Z] 00:19:12     INFO -                    0.0.0 Linux 2.6.29-gea477bb #1 Wed Sep 26 11:04:45 PDT 2012 armv7l
[task 2018-10-20T00:19:12.563Z] 00:19:12     INFO -  CPU: arm
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -       ARMv7 ARM Cortex-A8 features: swp,half,thumb,fastmult,vfpv2,edsp,neon,vfpv3
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -       1 CPU
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -  GPU: UNKNOWN
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -  Crash reason:  SIGSEGV
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -  Crash address: 0x0
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -  Process uptime: not available
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -  Thread 12 (crashed)
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -   0  libxul.so!mozilla::a11y::Accessible::Proxy() const [Accessible.h:c8d88737a20ef4975399bd8825f5519ac378d6c9 : 630 + 0x2]
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -       r0 = 0x00000000    r1 = 0x89b521e4    r2 = 0x60e39d38    r3 = 0x00000276
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -       r4 = 0x00000276    r5 = 0xffffffff    r6 = 0x00000000    r7 = 0x52d7f9f8
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -       r8 = 0x00000001    r9 = 0x52d7ff40   r10 = 0x6ce88160   r12 = 0x00000003
[task 2018-10-20T00:19:12.564Z] 00:19:12     INFO -       fp = 0x561a1a84    sp = 0x52d7f9f0    lr = 0x5f1467b9    pc = 0x5f146702
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -      Found by: given as instruction pointer in context
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -   1  libxul.so!mozilla::a11y::AccessibleWrap::ToBundle(bool) [AccessibleWrap.cpp:c8d88737a20ef4975399bd8825f5519ac378d6c9 : 378 + 0x7]
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -       r4 = 0x52d7fdbc    r5 = 0xffffffff    r6 = 0x00000000    r7 = 0x52d7fdb0
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -       r8 = 0x00000001    r9 = 0x52d7ff40   r10 = 0x6ce88160    fp = 0x561a1a84
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -       sp = 0x52d7fa00    lr = 0x5f1454d9    pc = 0x5f1454d9
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -      Found by: call frame info
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -   2  libxul.so!mozilla::a11y::SessionAccessibility::SendWindowStateChangedEvent(mozilla::a11y::AccessibleWrap*) [SessionAccessibility.cpp:c8d88737a20ef4975399bd8825f5519ac378d6c9 : 227 + 0x3]
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -       r4 = 0x6ce88160    r5 = 0xffffffff    r6 = 0x00000000    r7 = 0x52d7fde8
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -       r8 = 0x00000001    r9 = 0x52d7ff40   r10 = 0x00000000    fp = 0x561a1a84
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -       sp = 0x52d7fdb8    lr = 0x5f14820b    pc = 0x5f14820b
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -      Found by: call frame info
[task 2018-10-20T00:19:12.565Z] 00:19:12     INFO -   3  libxul.so!mozilla::a11y::AccessibleWrap::HandleAccEvent(mozilla::a11y::AccEvent*) [AccessibleWrap.cpp:c8d88737a20ef4975399bd8825f5519ac378d6c9 : 129 + 0x7]
[task 2018-10-20T00:19:12.566Z] 00:19:12     INFO -       r4 = 0x560ecac0    r5 = 0x6ce88160    r6 = 0x00000800    r7 = 0x52d7fe28
[task 2018-10-20T00:19:12.566Z] 00:19:12     INFO -       r8 = 0x00000001    r9 = 0x52d7ff40   r10 = 0x00000000    fp = 0x561a1a84
[task 2018-10-20T00:19:12.567Z] 00:19:12     INFO -       sp = 0x52d7fdf0    lr = 0x5f144c1b    pc = 0x5f144c1b
[task 2018-10-20T00:19:12.567Z] 00:19:12     INFO -      Found by: call frame info
[task 2018-10-20T00:19:12.567Z] 00:19:12     INFO -   4  libxul.so!nsEventShell::FireEvent(mozilla::a11y::AccEvent*) [nsEventShell.cpp:c8d88737a20ef4975399bd8825f5519ac378d6c9 : 46 + 0xb]
[task 2018-10-20T00:19:12.568Z] 00:19:12     INFO -       r4 = 0x54227b50    r5 = 0x6ce88160    r6 = 0x621bdf40    r7 = 0x52d7ff28
[task 2018-10-20T00:19:12.568Z] 00:19:12     INFO -       r8 = 0x00000001    r9 = 0x52d7ff40   r10 = 0x00000000    fp = 0x561a1a84
[task 2018-10-20T00:19:12.568Z] 00:19:12     INFO -       sp = 0x52d7fe30    lr = 0x5f15d315    pc = 0x5f15d315
[task 2018-10-20T00:19:12.569Z] 00:19:12     INFO -      Found by: call frame info
[task 2018-10-20T00:19:12.569Z] 00:19:12     INFO -   5  libxul.so!mozilla::a11y::EventQueue::ProcessEventQueue() [EventQueue.cpp:c8d88737a20ef4975399bd8825f5519ac378d6c9 : 341 + 0x5]
[task 2018-10-20T00:19:12.569Z] 00:19:12     INFO -       r4 = 0x00000002    r5 = 0x54227b50    r6 = 0x00000001    r7 = 0x52d7ff60
[task 2018-10-20T00:19:12.570Z] 00:19:12     INFO -       r8 = 0x00000001    r9 = 0x52d7ff40   r10 = 0x00000000    fp = 0x561a1a84
[task 2018-10-20T00:19:12.570Z] 00:19:12     INFO -       sp = 0x52d7ff30    lr = 0x5f14dd03    pc = 0x5f14dd03
[task 2018-10-20T00:19:12.570Z] 00:19:12     INFO -      Found by: call frame info
[task 2018-10-20T00:19:12.571Z] 00:19:12     INFO -   6  libxul.so!mozilla::a11y::NotificationController::WillRefresh(mozilla::TimeStamp) [NotificationController.cpp:c8d88737a20ef4975399bd8825f5519ac378d6c9 : 898 + 0x5]
[task 2018-10-20T00:19:12.571Z] 00:19:12     INFO -       r3 = 0x00000000    r4 = 0x52d7ff8c    r5 = 0x5f151515    r6 = 0x00000000
[task 2018-10-20T00:19:12.572Z] 00:19:12     INFO -       r7 = 0x52d800e0    r8 = 0x561a1a9c    r9 = 0x52d7ffe0   r10 = 0x561a1b04
[task 2018-10-20T00:19:12.572Z] 00:19:12     INFO -       fp = 0x561a1a84    sp = 0x52d7ff68    lr = 0x5f1520f9    pc = 0x5f1520f9
[task 2018-10-20T00:19:12.572Z] 00:19:12     INFO -      Found by: call frame info
Flags: needinfo?(eitan)
Oops. Super embarrassing. Let's do a full try first before relanding.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=1bab5adc1eb99cc78ae1e5da0a545c8718d58fc5
Flags: needinfo?(eitan)
This is green.. going to reland with the appropriate changes.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=e6dceb5d1dd79706f48f886e9eab7e06ecb0ebd1
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/92981a244297
Refactor AccessibleWrap::ToBundle 1/2. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/9b16d71b9fc4
Send abbreviated source bundles with accessibility events. r=Jamie
https://hg.mozilla.org/mozilla-central/rev/92981a244297
https://hg.mozilla.org/mozilla-central/rev/9b16d71b9fc4
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment on attachment 9017330 [details]
Bug 1499209 - Refactor AccessibleWrap::ToBundle 1/2. r?Jamie

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: bug 1479037

User impact if declined: Uplifts of already approved fixes for the regression would be very difficult because of missing code refactor and features of this bug.

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: No

If yes, steps to reproduce: 

List of other uplifts needed: none, is prerequisite for all the others.

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Refactor, more efficient code.

String changes made/needed: None.
Attachment #9017330 - Flags: approval-mozilla-beta?
Comment on attachment 9017331 [details]
Bug 1499209 - Send abbreviated source bundles with accessibility events. r?Jamie

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: bug 1479037

User impact if declined: Other uplifts already approved would become very difficult to fix the regression.

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: No

If yes, steps to reproduce: 

List of other uplifts needed: First patch from this bug.

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Code refactor, makes things more efficient.

String changes made/needed: None.
Attachment #9017331 - Flags: approval-mozilla-beta?
Comment on attachment 9017330 [details]
Bug 1499209 - Refactor AccessibleWrap::ToBundle 1/2. r?Jamie

ok let's land these too for the other a11y in 64.0b12
Attachment #9017330 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9017331 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.