Ensures that an AXTreeManager is present before trying to retrieve it When retrieving an AXTreeManager from AXTreeManagerMap, we were using operator[] to access the manager in the map. This would have the effect of creating an uninitialized AXTreeManager if the provided AXTreeID was not found in the map. To correct this, the map should be search first before trying to retrieve the manager and return nullptr if the manager is not found. Additionally, to prevent future errors with this method in case the code gets refactorred, the at(...) method is used instead of operator[] which would throw an out-of-range exception if the manager is not found in the map. R=aleventhal@chromium.org Bug: 956748 Change-Id: I0baf06f905dd7677534c2ce5b6dca087ca87a4b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1655994 Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Commit-Queue: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#669022}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .