[webkit-reviews] review denied: [Bug 237104] Fix for AXIsolatedTree::updateChildren in the case when is called for a non-existing isolated object or no children changed. : [Attachment 453303] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 26 14:36:20 PST 2022


Darin Adler <darin at apple.com> has denied Andres Gonzalez
<andresg_22 at apple.com>'s request for review:
Bug 237104: Fix for AXIsolatedTree::updateChildren in the case when is called
for a non-existing isolated object or no children changed.
https://bugs.webkit.org/show_bug.cgi?id=237104

Attachment 453303: Patch

https://bugs.webkit.org/attachment.cgi?id=453303&action=review




--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 453303
  --> https://bugs.webkit.org/attachment.cgi?id=453303
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453303&action=review

review- because of the move semantic mistake

> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:293
> +    axChildrenIDs.reserveInitialCapacity(axChildrenCopy.size());

If it’s going to be common to return a vector much smaller than this, we may
want to use shrinkToFit. On the other hand, if it’s a temporary that’s
immediately used and deallocated then not so important.

> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:295
> +	   collectNodeChangesForSubtree(*axChild, axObject.objectID(),
attachWrapper, changes, idsBeingChanged, WTFMove(filter));

This isn’t safe. We can’t use the function after moving it. I suggest passing
the Function as const&, not &&.

In some parts of our code, we figure out ways do to this kind of thing without
recursion.


More information about the webkit-reviews mailing list