Граф коммитов

404 Коммитов

Автор SHA1 Сообщение Дата
James Teh e8f0bb8cd9 Bug 1455745: Remove more accessibility related diagnostic crashes on Nightly. r=aklotz
This condition is rare and does indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing this as a result of this crash, so it causes user pain without any gain to us.

MozReview-Commit-ID: GacAQDbhB0h

--HG--
extra : rebase_source : 478ec67da378ff763c0e0d8a998de1956b51b85b
2018-04-23 12:27:17 +10:00
Yura Zenevich 55fe960cc1 Bug 1450927 - add getBoundsInCSSPixels XPCOM method. r=surkov r=jld
MozReview-Commit-ID: CTANPVQw1sG
2018-04-25 14:51:09 -04:00
Tiberius Oros 2fffa00bb3 Backed out 2 changesets (bug 1450927) for failing on ProxyAccessible.cpp(247) on a CLOSED TREE
Backed out changeset ca285aed3926 (bug 1450927)
Backed out changeset d7dd8b0d2473 (bug 1450927)
2018-04-25 19:31:50 +03:00
Yura Zenevich db18588465 Bug 1450927 - add getBoundsInCSSPixels XPCOM method. r=surkov r=jld
MozReview-Commit-ID: CTANPVQw1sG
2018-04-25 11:45:47 -04:00
Alex Gaynor 015fb6557b Bug 1454628 - fixed compilation with --disable-accessibility builds; r=aklotz
This was broken by bug 1453979.

MozReview-Commit-ID: JtJqICb2vBP

--HG--
extra : rebase_source : 90aa93a1591b0d8c0705fd79fdf9a64c5ee15e57
2018-04-17 13:01:19 -04:00
Alex Gaynor 6666b550ef Bug 1453979 - use ContiguousEnumSerializerInclusive for serializing enums in a11y IPC code; r=MarcoZ
MozReview-Commit-ID: 92S42SkSEEP

--HG--
extra : rebase_source : c549b4bd6de72ecd321c556b3330de92060973ec
2018-04-13 10:51:43 -04:00
shindli cdc66c6a3b Backed out changeset 99c2396a4c87 (bug 1453979) for mozmake.exe failures in z:/build/build/src/accessible/ipc/win/DocAccessibleChild.cpp on a CLOSED TREE 2018-04-16 21:07:44 +03:00
Alex Gaynor 6e06627ff1 Bug 1453979 - use ContiguousEnumSerializerInclusive for serializing enums in a11y IPC code; r=MarcoZ
MozReview-Commit-ID: 92S42SkSEEP

--HG--
extra : rebase_source : 6689ffd790390892faa4a80c60737934afda7477
2018-04-13 10:51:43 -04:00
Ciure Andrei 873d562bc3 Backed out 8 changesets (bug 1451169) on request from njn a=backout
Backed out changeset b92f856e15a8 (bug 1451169)
Backed out changeset 348e825756fa (bug 1451169)
Backed out changeset 624d82428726 (bug 1451169)
Backed out changeset 4d51610ca08e (bug 1451169)
Backed out changeset bb76a9589717 (bug 1451169)
Backed out changeset c145fbd03947 (bug 1451169)
Backed out changeset 6d36289e0f54 (bug 1451169)
Backed out changeset 914fb7cd9fc3 (bug 1451169)

--HG--
extra : histedit_source : 94de6631919f895dec422bc0e564f5baf885ba4a%2C18f52c6c11d3064d3137a6847575effb7d407894
2018-04-11 11:22:05 +03:00
Nicholas Nethercote 30c7ab35fe Bug 1451169 - Change nsRoleMapEntry::roleAtom from `nsStaticAtom**` to `nsStaticAtom* const`. r=davidb
And likewise for AttrCharacteristics::attributeName.

MozReview-Commit-ID: DwGzWCCKcVP

--HG--
extra : rebase_source : ac595af0b0da2cee36b5aecf4474880fbe993f11
2018-04-03 10:55:33 +10:00
James Teh 83a22d7047 Bug 1448091 part 2: AccessibleHandler: Don't repeatedly and unnecessarily refresh the cache after the first change. r=MarcoZ
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
2018-03-23 11:53:01 -04:00
James Teh 46dc3c27be Bug 1448091 part 1: Accessible HandlerProvider: Return an error if refreshing the cache fails. r=MarcoZ
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
2018-03-23 11:44:05 -04:00
James Teh ab44d98e0d Bug 1431256 correction: AccessibleHandler: Really return E_NOINTERFACE for IEnumVARIANT if there are no children. r=MarcoZ
A typo meant we were checking the address of mChildCount, not the value.

MozReview-Commit-ID: 7Hit3FBy9pr

--HG--
extra : amend_source : edb85b8e73184e47cd9ff42c0442f89d5f3c5152
2018-03-22 17:57:34 -04:00
Noemi Erli 1270a21724 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-23 01:00:18 +02:00
James Teh 25c5e06a69 Bug 1431256 part 4: Remove IEnumVARIANT from the AccessibleHandler payload. r=MarcoZ
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
2018-01-19 11:40:42 +10:00
James Teh 4ce4f0dab8 Bug 1431256 part 3: AccessibleHandler: When a client requests children, fetch them optimally using a single cross-process call. r=MarcoZ
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
2018-03-21 11:03:45 -04:00
James Teh 7603de4f18 Bug 1431256 part 2: AccessibleHandler: Implementation of IAccessible2 for text leaf accessibles using data provided in AccChildData. r=MarcoZ
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
2018-03-21 10:56:11 -04:00
James Teh 39c71764d7 Bug 1431256 part 1: Accessible HandlerProvider: Implement a method to optimally retrieve all children in a single call. r=MarcoZ
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
2018-03-21 10:08:53 -04:00
David Major 524a6c226d Bug 1324110: Add braces to initialization in ProxyAccessible.cpp to appease clang-cl. r=Jamie 2018-03-22 14:20:56 -04:00
James Teh 7e1997102b Bug 1444851 - a11y::HandlerProvider: Clear the interceptor target reference when disconnecting remotes. r=aklotz
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
2018-03-19 11:03:18 +02:00
Tom Ritter f572733682 Bug 1444169 Fix capitalization for a few Windows files r=aklotz
MozReview-Commit-ID: BlWgIVobOBK

--HG--
extra : rebase_source : 71a8052c562aa7be510e3a4c13a0ca698a04a5ac
2018-03-08 14:49:59 -06:00
James Teh f84eedf97c Bug 1434822 part 3: On Windows, when a content Accessible shuts down, disconnect all associated remote clients. r=MarcoZ
To improve performance for cross-process COM, we disable COM garbage collection.
However, this means we never receive Release calls from clients, so defunct accessibles can never be deleted.
Since we know when an accessible is shutting down, we can work around this by forcing COM to disconnect this object from all of its remote clients, which will cause associated references to be released.

MozReview-Commit-ID: 5sIuxnaRJWj

--HG--
extra : rebase_source : e5c54e4f107b2db39d77277020aa939a6a283bd8
extra : histedit_source : 0a964ba20363cc1b8880d78e5d214dae0f758a01
2018-02-22 22:00:36 +10:00
Bogdan Tara 0a896b5418 Backed out changeset 918b41fa66d9 (bug 1434822) is causing 1442523. a=backout 2018-03-02 11:27:08 +02:00
James Teh a2e576c75c Bug 1434822 part 3: On Windows, when a content Accessible shuts down, disconnect all associated remote clients. r=MarcoZ
To improve performance for cross-process COM, we disable COM garbage collection.
However, this means we never receive Release calls from clients, so defunct accessibles can never be deleted.
Since we know when an accessible is shutting down, we can work around this by forcing COM to disconnect this object from all of its remote clients, which will cause associated references to be released.

MozReview-Commit-ID: 5sIuxnaRJWj

--HG--
extra : rebase_source : 9059dbed02bf78b4be5b544c8b3bc14f0ca088c8
2018-02-22 22:00:36 +10:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson 0129d900f3 Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Mike Shal 15573ecba5 Bug 1420119 - avoid issues with make's timestamp caching; r=nalexander
When an idl file is updated, files like HandlerData.h are generated as
part of the midl target (eg: midl_done). However, Make may have already
stat'd HandlerData.h and cached its timestamp. Although there is a
dependency from HandlerData.h on midl_done, there is no recipe. As such,
Make assumes that HandlerData.h hasn't actually changed, and uses the
cached value of the timestamp when determining if it should install the
file into dist/include. If the cached value is older, make may not
trigger the install rule, leaving the old header in place and breaking
the build.

MozReview-Commit-ID: 9rdtXIt8mXC

--HG--
extra : rebase_source : 8b22f1d6656d0dbc2c3b5dc53ea2b936fdd637bd
2018-02-13 16:04:31 -05:00
David Parks d2fcfd4724 Bug 1358372: Part 2 - Run Windows AudioSessionControl operations on main thread r=jimm
This plays better with sndvol.exe.  It reduces the impact of a bug that shows multiple volume sliders for the content processes.
2018-01-10 14:57:19 -08:00
James Teh b65ec03904 Bug 1431264 part 3: AccessibleHandler: If a client wants to query all relations, fetch as much info as possible in a single cross-process call. r=MarcoZ
If a client calls IAccessible2::nRelations, it's likely that it will next call IAccessible2::relations to query each relation.
Furthermore, it's likely the client will call relationType and nTargets on each relation.
Therefore, fetch all of this info when nRelations is called.
The number of relations is immediately returned to the client.
The rest of the info is cached and returned to the client when the appropriate methods are called.
The info is only cached for one call; i.e. after the client calls relations once, the cache is dropped.
This makes memory management simpler and lowers the risk of cache invalidation problems.

MozReview-Commit-ID: IBoJbu42osG

--HG--
extra : rebase_source : d1af83f4c6c0e7762299e9e3da95a67217157200
2018-02-02 09:38:51 +10:00
James Teh 19ad84e3ed Bug 1431264 part 2: AccessibleHandler: Local implementation of IAccessibleRelation using data provided in IARelationData. r=MarcoZ
The HandlerProvider::RelationsInfo method provides the type and number of targets for each relation in an IARelationData struct.
This local implementaition of IAccessibleRelation is constructed with an IARelationData struct and serves a single relation.
It uses the data from the struct to answer queries, except for actual targets.
For targets, it makes a remote call to IA2_2::relationTargetsOfType to answer the query.
We use relationTargetsOfType instead of IARelation::targets because marshaling so many IARelation pointers is a major bottleneck.

MozReview-Commit-ID: Dva00FhoSbx

--HG--
extra : rebase_source : 6dc2f46eb99e5c19ace89d0d9d21558b675ab68e
2018-02-02 09:35:16 +10:00
James Teh 2bbbe57bb9 Bug 1431264 part 1: Accessible HandlerProvider: Implement a method to retrieve info for all relations in a single call. r=MarcoZ
IAccessible2::relations allows you to fetch IAccessibleRelation objects for all relations.
However, you must first call IAccessible2::nRelations to get the number of relations.
In addition, getting the type and number of targets for each relation requires additional calls.
This new method allows all of this to be retrieved in a single cross-process call.

MozReview-Commit-ID: 3zEIjxEyMP5

--HG--
extra : rebase_source : 281217f4c0974040e35a197d0f1c555d9e4356fc
2018-02-02 09:16:17 +10:00
James Teh 2b917a104f Bug 1430938 part 2: AccessibleHandler: When QueryService is called for IAccessibleAction or IAccessibleText, just use QI. r=MarcoZ
JAWS uses QueryService for these.
Using QI avoids a cross-process call, since we have these interfaces cached.
More importantly, if QS is used, the handler won't get used for that object, so our caching won't be used.

MozReview-Commit-ID: Ejc2Bjp7NSv

--HG--
extra : rebase_source : f0154a6691d4d6be97e9aa60b0613ff04f76b7ff
2018-01-17 10:23:07 +10:00
James Teh f3b93020fe Bug 1430938 part 1: AccessibleHandler: Handle some additional unsupported services queried by JAWS and UI Automation. r=MarcoZ
We just return failure for these, thus avoiding a pointless cross-process call.
I also updated the comment for an existing service, since I discovered its constant name.

MozReview-Commit-ID: E5hjhR6nYtv

--HG--
extra : rebase_source : 8f01da6b98a881809a106a03eb611aadc90a6d20
2018-01-17 10:18:49 +10:00
Milan Sreckovic 6cf51345e7 Bug 1423541: Use BaseRect access methods instead of member variables in accessible/ r=surkov
MozReview-Commit-ID: KRfgYEW7aWY

--HG--
extra : rebase_source : b88fcdb3095ac9bfa82ae6a596070d80c1c482fd
2018-01-12 12:07:29 -05:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
James Teh 31c03e927b Bug 1421873: Fix infinite loop in HandlerProvider::GetAllTextInfoMainThread when invalid attribute offsets are returned. r=MarcoZ
When querying text attributes, Gecko can return an end offset less than the requested offset in some rare cases, which isn't valid.
This is perhaps because the text mutated during the attribute fetching loop for some reason, making the requested offset invalid.
We now check the end offset and break out of the loop in this case.
This fixes a freeze after sending a message in OX Mail with NVDA.

MozReview-Commit-ID: 1lVSLAdOcS7

--HG--
extra : rebase_source : 048fbed8ddc591f62c17d559483bfe2f1542431c
2017-11-30 16:44:02 +10:00
James Teh abec79ee0b Bug 1421209 part 1: Fix incorrect iid in AccessibleHandler::ResolveIAHypertext. r=MarcoZ
Previously, it was querying for IID_IAccessibleHypertext, but this is actually an IAccessibleHypertext2 pointer.
This meant we were crashing when trying to call an IAccessibleHypertext2 method.
This was a regression introduced in bug 1419362.

MozReview-Commit-ID: 7akjIfNuIh3

--HG--
extra : rebase_source : 18e126e3b47bc5a8f486870a285668a7f85e95c9
2017-11-29 14:39:00 +10:00
James Teh e9098869dd Bug 1421478: Clarify comment in handlerDataCleanup.h. r=aklotz
MozReview-Commit-ID: EVzuqVMl7Ck

--HG--
extra : rebase_source : ebcad7cbc5ed49417ece2d9b220d52488ee28732
2017-11-29 10:18:01 +10:00
James Teh 2cb46a14be Bug 1418448 part 3: Accessible Handler/Provider: Unify release of interfaces in StaticIA2Data. r=aklotz
Both Provider and Handler need to release the interfaces in StaticIA2Data.
Therefore, move this into a common function to avoid duplication pain in future.

MozReview-Commit-ID: 7J4iuvDa8m2

--HG--
extra : rebase_source : 98c97b51c27c318ba987787518cfd70bda8967d4
2017-11-24 15:10:41 +10:00
James Teh f7fcce5742 Bug 1418448 part 2: AccessibleHandler: Clean up DynamicIA2Data. r=aklotz
We need to clean up the VARIANT and BSTRs in DynamicIA2Data in the handler as well.
We do this in two places:
1. Before reading a new payload (because we need to clean up the existing payload); and
2. When we're being destroyed.

MozReview-Commit-ID: GvO7csuxtwZ

--HG--
extra : rebase_source : 92cc9a64deddee07bbbc77e53117c15351816778
2017-11-24 15:14:04 +10:00
James Teh f81d8d0130 Bug 1418448 part 1: Accessible HandlerProvider: Clean up DynamicIA2Data correctly. r=aklotz
DynamicIA2Data contains several BSTRs that need to be freed with SysFreeString.
Previously, we just did a ZeroMemory without actually freeing them.
This cleanup code is placed in a header file so it can be used by AccessibleHandler as well.

MozReview-Commit-ID: 4SWuK9oMRYZ

--HG--
extra : rebase_source : e7358752e7eee1bae000e4005832bfc48c9342af
2017-11-24 15:12:37 +10:00
James Teh 242aa87f1a Bug 1419362 part 4: AccessibleHandler: When a caller asks for all text, cache hyperlinks and text attributes in the same call. r=MarcoZ
If a client requests all text (via IAccessibleText::text with IA2_TEXT_OFFSET_LENGTH), it's quite likely they will want all other information about the text as well; i.e. embedded objects and attributes.
Therefore, fetch all of this using a single cross-process call.
The text is immediately returned to the client.
The hyperlinks and attributes are cached for later return to the client when they call the appropriate methods.
They are only cached for one call; i.e. after the client retrieves them, the cache is dropped.
This makes memory management simpler and lowers the risk of cache invalidation problems.

MozReview-Commit-ID: FgFkX8J7wg1

--HG--
extra : rebase_source : e521d6ca7b00fcf1aad1f0ada299bac4c4b85c50
2017-11-22 21:32:28 +10:00
James Teh f5aa51e880 Bug 1419362 part 3: Accessible HandlerProvider: Implement a method to retrieve all text, hyperlinks and attributes at once. r=aklotz,MarcoZ
This allows the handler to fetch all text information in a single cross-process call when appropriate.
Normally, it would be a minimum of 3 calls, plus one call for each additional attribute run.

MozReview-Commit-ID: K5x9bAWiWWJ

--HG--
extra : rebase_source : fbf89ff79d7afcff6bcc32ff940f9e06c1e7f136
2017-11-22 16:08:11 +10:00
James Teh 29ed5a05ed Bug 1419362 part 2: Move AccessibleTextTearoff into AccessibleHandler. r=MarcoZ
We want to be able to cache data related to both IAccessibleText and IAccessibleHypertext2 in a single call.
This is difficult with the tearoff because separate instances of the tearoff get created for the two interfaces.
Ensuring we use the same instance means working around reference cycles.
We could maintain a separate cache object, but that makes things more complex.
Therefore, it's much simpler to get rid of the tearoff.

A few things to note:

1. ResolveAccHypertext has been renamed to ResolveIAHypertext for consistency with the rest of AccessibleHandler.
2. mAccHypertextProxy has been renamed to mIAHypertextPassThru for consistency with the rest of AccessibleHandler.
3. mIAHypertextPassThru is a weak reference (just like the rest of the passthru pointers) because it refers to a proxy interface and the proxy aggregates the handler.
  Thus, we release it immediately to avoid reference cycles.
  When it was a tearoff, this was not the case; it was a strong reference.

MozReview-Commit-ID: 8NwPA0T1MFX

--HG--
extra : rebase_source : 57c4d19516d01b820bb3b4c1a9974ff3b889ed64
2017-11-22 12:16:18 +10:00
James Teh f08015a587 Bug 1417327 part 3: Accessible handler: Fix cache for IAccessible::accDefaultAction and use it for IAccessibleAction::name(0). r=MarcoZ
1. Bug 1363595 added support for retrieving accDefaultAction from the cache, but the value was never cached in the first place.
This would have meant that accDefaultAction was returning nothing to clients.

2. Since accDefaultAction is the name of the first action, we can also use this cached value for IAccessibleAction::name for index 0.

MozReview-Commit-ID: 6PGRH45kKdB

--HG--
extra : rebase_source : 52688f1e44ad7613c5dd14903b6240a51aa2d4eb
2017-11-16 16:51:28 +10:00
James Teh 2d3278eb8f Bug 1417327 part 2: Accessible handler: Cache IAccessibleTableCell row/column indexes/extents. r=MarcoZ
MozReview-Commit-ID: 8hMzyJZ5zFI

--HG--
extra : rebase_source : dd66de5e37cc1abdbb5e0e7bb6d3bf67ad65edbb
2017-11-16 11:47:28 +10:00
James Teh c743f90376 Bug 1417327 part 1: Accessible handler: Cache IAccessibleAction::nActions. r=MarcoZ
MozReview-Commit-ID: EJIhSxSiQGq

--HG--
extra : rebase_source : 89b73bd626f93c17a467c5ad06b391bffa534ced
2017-11-15 17:27:05 +10:00
James Teh fb7c94c665 Bug 1416986 part 4: AccessibleHandler: Don't fall through to the proxy for IAccessibleHyperlink. r=aklotz
The handler's implementation of IAHyperlink just forwards calls through to the proxy.
However, it exists because we want the cache to be used when a hyperlink is retrieved.
When querying from the handler to IAHyperlink, we should use the same implementation.
This is mostly about consistency/correctness, especially as we're increasing complexity.

MozReview-Commit-ID: AwYibrFzUyf

--HG--
extra : rebase_source : 3d8f33639190a4220a21d0a6eeac401829d8345c
2017-11-15 12:32:52 +10:00
James Teh ff41c00a3e Bug 1416986 part 3: AccessibleHandler: Avoid cross-process QI calls for interfaces which we know don't exist. r=aklotz
The proxy manager caches interfaces marshaled in the payload and returns them on QI without a cross-process call.
However, it doesn't know about interfaces which don't exist.
We can determine this from the payload, since interfaces which don't exist will have a null pointer.
We use this information to avoid querying the proxy in this case.

MozReview-Commit-ID: FnzDetmTiPP

--HG--
extra : rebase_source : 076ce714a69d3883a149487e5f9235ff495eedd0
2017-11-15 12:28:45 +10:00
James Teh aebc388fb6 Bug 1416986 part 2: Include interfaces the client is likely to request in the accessible handler payload. r=aklotz
Now that virtual buffers have to render across processes, we want to eliminate as many cross-process calls as possible.
This includes QueryInterface calls, since buffers query for several interfaces on every node they visit.
To avoid these cross-process QI calls, we include interfaces clients are likely to request in the handler payload.
This way, they get marshaled in the single call used to retrieve the object.

This patch does the following:

1. Passes the interceptor when building the payload.
We need this so we can get interceptors for other interfaces.

2. Splits the payload into two main parts: a static part and a dynamic part.
The (new) static part contains the interface pointers. The dynamic part contains the rest.
This is necessary because the refresh call cannot pass the interceptor, but the interceptor is needed to build the static part.
Also, re-building the static part is pointless when refreshing.

3. Includes the interface pointers in the payload (BuildStaticIA2Data).
The pointers also have to be cleaned up after marshaling.

4. Releases the interface pointers in the handler after the payload is received.
We do this because they're aggregated by the proxy manager as they're unmarshaled.

MozReview-Commit-ID: 6VRLMNScgwW

--HG--
extra : rebase_source : 249589643b7a69e870962ea55a44849bf03a2693
2017-11-15 12:18:18 +10:00