[wpe-2.46] Avoid premature atspi interactions during initialization#1617
Merged
magomez merged 1 commit intoWebPlatformForEmbedded:wpe-2.46from Feb 12, 2026
Conversation
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>
magomez
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.