[PaintWorklet] Do null check for document paint definition
In quite a few functions in the CSSPaintImageGeneratorImpl class, we check whether the document paint definition of a particular name exists or not, but we never do null check on that definition. This could lead to crash if the document paint definition is a null ptr. This CL fixes the problem by doing null check. It also changes one layout test to execise this code path. The change to the layout test also fixes the problem that this layout test passes in the browser that doesn't support paint worklet. Bug: 802970, 768683 Change-Id: Ia952ad977b63af643410b0973cc8034fac504f9f Reviewed-on: https://chromium-review.googlesource.com/869891 Commit-Queue: Xida Chen <xidachen@chromium.org> Reviewed-by:Robert Flack <flackr@chromium.org> Reviewed-by:
Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#530441}
Showing
Please register or sign in to comment