Commit ea74f46
committed
Avoid premature atspi interactions during initialization
Currently, when the system is starting up, it will perform the atspi
related initializations to allow clients to connect. When a client
connects, the accessibility object cache is enabled via a call to
AXObjectCache::enableAccessibility(). On certain platforms, a client may
connect only if accesibility support is enabled via a user configurable
menu option (e.g. to enable/disable voice guidance) to minimize
unnecessary D-Bus traffic. Consequently, the accessibility object cache
may not be enabled when the page loads and no accessibility related
information will be gathered.
If the user enables accessibility without effectively leaving the
browser (e.g. remote control shortcut), accessibility will not be
operational on the currently loaded page. A page reload would be
required or changes to the DOM tree, which may not happen depending on
the app design (at least while on the page the user is navigating on).
To overcome this, the accessibility cache may be enabled by default (via
custom patch). This leads to a race condition between the atspi init
sequence waiting to take ownership of the bus name, and the page load
causing state changes that lead to attempts to register objects:
AccessibilityAtspi::stateChanged() ->
AccessibilityObjectAtspi::path () ->
AccessibilityObjectAtspi::registerObject() ->
AccessibilityAtspi::registerObject() ->
RELEASE_ASSERT(!m_isConnecting);
To overcome this, we'll consider the connection as established to allow
method calls to complete only after acquiring the bus name.
Signed-off-by: Filipe Norte <filipe_norte@comcast.com>1 parent 6ba89b2 commit ea74f46
2 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
0 commit comments