Loading
Bug 1779578 part 2: Split serialization of a11y subtrees across multiple IPDL...
Bug 1779578 part 2: Split serialization of a11y subtrees across multiple IPDL calls if we are likely to exceed the IPDL maximum message size. (ESR) a=RyanVM In the content process, we simply split into multiple calls when the number of Accessibles exceeds our maximum. The maximum is calculated to allow for every Accessible to consume 2 KB in the IPDL message. Currently, this means we split every 131072 Accessibles. Of course, we could still exceed this IPDL message size if one or more Accessibles consumed a lot more than this; e.g. many labels longer than 2 KB. However, this seems unlikely in the real world. If this turns out to be a problem, we'll need to count the actual size of the serialized data for each Accessible. For example, we could use AccAttributes::SizeOfExcludingThis, though that isn't exactly the serialized size. I worry though that such data structure traversal could get expensive at scale. In the parent process, we defer attaching the root of the new subtree to its parent until the final call. This is achieved by saving the root during the first call and using that to attach and fire events in the final call. Original Revision: https://phabricator.services.mozilla.com/D184367 Depends on D192439 Differential Revision: https://phabricator.services.mozilla.com/D192440