
It was wrong to assume that coalition_info_resource_usage will return a value if it returned a value in a previous call. It can fail if the kernel can't allocate memory (https://github.com/apple/darwin-xnu/blob/main/osfmk/kern/coalition.c#L736). This CL makes the code resilient to that. Bug: 1298733 Change-Id: I3f6700dd6911eef06b9d2666e715a3a72e9ddcb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3473471 Commit-Queue: Francois Pierre Doray <fdoray@chromium.org> Auto-Submit: Francois Pierre Doray <fdoray@chromium.org> Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#973002}