[CI] Fix caching of image size in CSSGeneratedImageValue
The CSSGeneratedImageValue image and client cache has only one slot for the size of the image associated with any given client, but the client could be registered with an empty size and a non-empty size. In such cases we would not over-write the non-empty size with the empty size, despite having deleted the non-empty image. Subsequently removing the client again would try to remove the non-empty one instead. This patch adds DCHECKs to catch these cases, and fixes the logic to only store non-empty sizes. Comments are added explaining the invariant that the client only be present at one non-empty size at any given time. R=fs@opera.com BUG=803224 Change-Id: Ie5601aaffe6e3eace4ff4a989dc892bea4fd381b Reviewed-on: https://chromium-review.googlesource.com/876900Reviewed-by:Fredrik Söderquist <fs@opera.com> Commit-Queue: Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/master@{#530674}
Showing
Please register or sign in to comment