I moved the IgnoreErrors decl so it would come after the OOMReporter decl and I
could add the new conversion operator.
MozReview-Commit-ID: B1S6DXmZfvE
The singleton AccessibleHandlerControl maintains a global cache generation counter which is incremented whenever any node is changed.
The handler for each node tracks the cache generation at the time its cache was initialized.
To check whether the cache needs to be updated, the handler compares its generation against the global generation from AccessibleHandlerControl.
If they differ, it refreshes the cache.
Previously, the handler didn't update its cache generation after refreshing.
This meant that every single query after the first change would refresh the whole cache, even if there wasn't a second change.
This resulted in a huge number of wasted cache updates for clients such as JAWS which hold onto accessibles, rather than releasing them and fetching them again for each update.
MozReview-Commit-ID: 80d4n1cIjzQ
--HG--
extra : rebase_source : a0903ddb33eba5381a232a661deaa3754b92406f
BuildDynamicIA2Data can't return an HRESULT; failure is communicated by the fact that the unique id in the data is set to 0.
However, IGeckoBackChannel::Refresh returned S_OK even if BuildDynamicIA2Data failed.
We now check the unique id and return an appropriate error code if it's 0.
Among other things, this means that the handler will return an error when querying dead objects instead of returning stale cache data.
MozReview-Commit-ID: IorDRHCItD8
--HG--
extra : rebase_source : 1b3b8393309ccefac27d0228aa528cd6fa55ad35
A typo meant we were checking the address of mChildCount, not the value.
MozReview-Commit-ID: 7Hit3FBy9pr
--HG--
extra : amend_source : edb85b8e73184e47cd9ff42c0442f89d5f3c5152
Now that the handler implements IEnumVARIANT itself (and uses our own internal method to retrieve the children), caching this remote interface is pointless.
MozReview-Commit-ID: FyagiEcHMP2
--HG--
extra : rebase_source : 267568164fb46d98c8cde22dfbb4f36f2afceb8c
This implements IEnumVARIANT locally using the new method provided by HandlerProvider.
This avoids marshaling full objects for text leaf accessibles (instead using HandlerTextLeaf), which is much faster.
It also avoids a pointless cross-process call to IEnumVARIANT::Reset (and possibly IEnumVARIANT::Clone).
Finally, it caches children after the first query so that clients (such as UI Automation) which walk children one by one don't incur separate cross-process calls for every child.
MozReview-Commit-ID: KUIXQoXxInQ
--HG--
extra : rebase_source : a6c0a56c2bb65e227f7c45eb1b767e7df19efa49
For text leaf accessibles, the HandlerProvider::AllChildren property provides text and other necessary information in an AccChildData struct, rather than providing the full accessible object.
Therefore, we must provide a specific local implementation of IAccessible2 which answers queries based on the data provided in this struct.
MozReview-Commit-ID: 8BYMF59EoTe
--HG--
extra : rebase_source : 0cdc01158f7fd1a04b0751a0a1703f9aa03cbe4c
When considering a large document, a huge number of the children we return are text leaf nodes.
Marshaling full objects is expensive, but for text leaf nodes, the client is only interested in the text and a few other pieces of information.
Therefore, rather than returning the full object for text leaf accessibles, we just return the text and other necessary information.
For other non-text children, we return the full object as usual.
In addition, clients normally use the IEnumVARIANT interface to retrieve children in a single call.
However, it doesn't allow you to specify a starting index.
Therefore, you must first call the Reset method to reset the starting point to 0.
Practically, this means an extra cross-process call whenever the caller fetches children.
When dealing with a large document, this can be a significant number of wasted calls.
This new method retrieves all children always starting at the first using a single call.
MozReview-Commit-ID: A9lc7BBTWdb
--HG--
extra : rebase_source : d50507c182ab7760c17c5e7bb9956f46a3dc188c
nsFrameLoader is on WebIDL bindings, so those QIs are no-ops anyway, unless the given object is no a frameloader to start with.
MozReview-Commit-ID: IPiW70H5NPc
Some of the definitions are needed for the headers removal in
following patches.
MozReview-Commit-ID: BCj7U7RgBLj
--HG--
extra : rebase_source : e8e437f76c4db6ec930ea0481b6c1a38129a5477
extra : source : a1c42220e5070fa4beea438859ab0daec3f3fe7b
If a handlerProvider call is pending on another thread, CoDisconnectObject won't release this HandlerProvider immediately.
However, the interceptor and its target might be destroyed.
MozReview-Commit-ID: 75SyPMIpit0
--HG--
extra : amend_source : a80f50f754c9be171e9262b13136e95005bc62af